Jump to content
Sign in to follow this  
akienghie09

String Concatenation

Recommended Posts

Hi!, This is my sample part of my program.. $row['name'].",". $row['region'].",". $row['city'].",". $row['area'].",". $row['street'].",". $row['building'].",". $row['totalorders'].",". $row['totalgross'].","."<br>"; that the output is like this...name, region, city, area, street, building, totalorders, totalgross the output that I need is like this.."name","city","area","street","building","totalorders","totalgross", can you help me how can I make this output..?thanks and have a great day ahead! :)

Share this post


Link to post
Share on other sites

Just add the quotes to the string. It's simple.

'"' . $row['name'] . '", "' . row['region'] . '", "' ... ...

  • Like 1

Share this post


Link to post
Share on other sites

Personally, I like to use the extra brackets around variables that are in strings, makes them easier to read: $str = "'{$row['name']}', '{$row['region']}', '{$row['city']}'";

Edited by Err
  • Like 1

Share this post


Link to post
Share on other sites

Ingolme & Err, thank you for your help. It already work. Thanks again. Best Regards!

Edited by akienghie09

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...