Perad Posted April 30, 2008 Share Posted April 30, 2008 Variables print fine. I try to use them 2 lines down and wtf they are not added to the string. The question. How can I add $extention[$ex] to $copyto = $this->config->item('upload_dir') . 'images/'.$newname.'.' How can I add $image to $copyfrom = $this->config->item('upload_dir') . "preview/" print $image.'<br/><br/><br/><br/><br/>'; print $extention[$ex].'<br/><br/><br/><br/><br/>'; $newname = rand('11111111', '99999999'); $copyto = $this->config->item('upload_dir') . 'images/'.$newname.'.'.$extention[$ex]; $copyfrom = $this->config->item('upload_dir') . "preview/" . $image; Link to comment https://forums.phpfreaks.com/topic/103561-baffling-problem-joining-strings/ Share on other sites More sharing options...
The Little Guy Posted April 30, 2008 Share Posted April 30, 2008 <?php echo $l1 = $image.'<br/><br/><br/><br/><br/>'; echo $l2 = $extention[$ex].'<br/><br/><br/><br/><br/>'; $newname = rand('11111111', '99999999'); $copyto = $this->config->item('upload_dir') . 'images/'.$newname.'.'.$l2; $copyfrom = $this->config->item('upload_dir') . "preview/" . $l1; ?> Like this??? Link to comment https://forums.phpfreaks.com/topic/103561-baffling-problem-joining-strings/#findComment-530275 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.