Putting this:
<?php printf("<img src=\"../herodb/title.%s.%s.gif\">", $hero->f("FirstName"), $hero->f("LastName")); ?>
I get...
"../herodb/title...gif"
As result. Why? I'd want: "../herodb/title.{firstname}.{lastname}.gif".
have you looked at the contents of $hero->f("Firstname") and $hero->f("Lastname") just using a print statement?
just checking
dom 🙂
Yup!
As print statement it works. It prints out the right names.
Nico
why not use print then? (just wondering)
I get a parse error if I use the print statement for the image.
I cant understand why it doesn't work... should work (http://www.zend.com/manual/function.sprintf.php)
parse error? hmm.. that don't sound right. to be honest, i'm a tad confused.
so does the following cause it do die?
print "<img src=\"../herodb/title".$hero->f('Firstname')."".$hero->f('Lastname').".gif\">";
get back to me
THAT WORKS!!!
Cool!
Cheers.