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 Quote 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'); Quote Link to comment https://forums.phpfreaks.com/topic/240681-simple-syntax-in-string/#findComment-1236172 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.