PHP: Join variable to a string

  • bretlee123
  • Born
  • Born
  • bretlee123
  • Posts: 3

Post 3+ Months Ago

Code: [ Select ]
$imagefilename = 'new';
$imagefilename = '../userimages/'.$imagefilename.'2.jpg';
  1. $imagefilename = 'new';
  2. $imagefilename = '../userimages/'.$imagefilename.'2.jpg';

im trying to join a variable to a string, is the code above enough to do this?

my current output just excludes the variable in between the two strings?

thanks
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Nightslyr
  • Proficient
  • Proficient
  • Nightslyr
  • Posts: 283

Post 3+ Months Ago

bretlee123 wrote:
Code: [ Select ]
$imagefilename = 'new';
$imagefilename = '../userimages/'.$imagefilename.'2.jpg';
  1. $imagefilename = 'new';
  2. $imagefilename = '../userimages/'.$imagefilename.'2.jpg';

im trying to join a variable to a string, is the code above enough to do this?

my current output just excludes the variable in between the two strings?

thanks


That should work.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 144 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.