barney0o0 Posted June 29, 2011 Share Posted June 29, 2011 Sorry chaps, maybe tired, but i cant get my head around this I want to produce something like: $pdf->Image('http://www.website.com/frames/'.$1'"."'.$2'.L.jpg', '20', '70', '', '60'); Which in real terms should produce: $pdf->Image('http://www.website.com/frames/002.251L.jpg', '20', '70', '', '60'); ..but i cant get the syntax right with added the values in a string. Could someone give me a shove in the right direction. Thanks in advance Link to comment https://forums.phpfreaks.com/topic/240681-simple-syntax-in-string/ Share on other sites More sharing options...
WebStyles Posted June 29, 2011 Share Posted June 29, 2011 According to php.net manual, variables names must start with a letter or an underscore, not a number, so $1 and $2 are invalid. $pdf->Image('http://www.website.com/frames/' . $a . '.' . $b . 'L.jpg', '20', '70', '', '60'); Link to comment https://forums.phpfreaks.com/topic/240681-simple-syntax-in-string/#findComment-1236172 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.