So i have a problem with taking an array and looping through the values and outputing with a foreach statement.
code
<?php
$example = array("test" => "hello world" );
foreach ($example as $arr) {
printf("<p>what do you have to say for yourself?</p><p>%s!</p>",$arr["test"]);
}
?>
hoping to get the output:
what do you have to say for yourself?
hello world!
Instead get
what do you have to say for yourself?
h!
why just the single character?
Any help would be great
thanks