Its a very simple question !
I execute a select query in mysql and I have result as an array.
I only need to print some of values and not the whole array.
What is the best way to do that ?
echo $row['id']['range']['name]';
only print id.
Also I need to have them in a good format.
Like :
Id range name
And please help me on my second question
How can I separate the result of this code in a good format (in this case it print 3 string) :
while($row= mysql_fetch_assoc($result)) {
echo $row['name'];
}
Formatting will be done by outputting the html you want to use. The example below uses the paragraph tag. You cannot simply stick array keys together like that to reference multiple elements. That syntax is for delving down into multidimensional arrays.