Hi
I am new to php so please bear with me if this is a simple question.
I wanted to get the first letter from a returned query string. Using the mysql_fetch_array() function I created two variables, firstNAME[0] and lastNAME[1].
I wanted to truncate the firstNAME[0] variable to just get the first letter. I read that strings can be treated as arrays, so I tried to store the first letter using the line:
$first = firstNAME[0][0]
as I might in JavaScript. I simply got the firstname plus [0] stored in the variable $first.
I have since got round the problem by using the function substr() but can anyone tell me how to reference the value using some kind of multiple array syntax, if this is possible.
Thank you for reading!