Is there a simpler way of printing a PHP array in a string?

MatejKravanja

New Member
As you know, a good programmer is a lazy programmer, but I'm just lazy. My question is this: Is there a simpler way to print out an element of an array (from a MySQL query) in a PHP echo statement?I usually do this:\[code\]echo "string start " . $array['element'] . " string end";\[/code\]It works FINE, I'd just like a shorter way of printing it out, because echo sees the "['element']" bit of the variable as a string. I could use list() to get all the elements, but that's not what I'm after.So, are there any answers out there?Thanks for reading,James
 
Back
Top