princeofpersia Posted December 21, 2010 Share Posted December 21, 2010 Hi guys I have two variables but $no1=$row[no1]; $no2=$row[no2]; I need to have another variable where i can merge these two as i need to insert them to database with sapce in between each variable like: $numbers= $no1 $no2; by doing this i get syntax error, do u know whats the best way to do this? Link to comment https://forums.phpfreaks.com/topic/222315-php-variables/ Share on other sites More sharing options...
PFMaBiSmAd Posted December 21, 2010 Share Posted December 21, 2010 $numbers= "$no1 $no2"; If these are already in the same database table where you want store the results, you can do this using a single UPDATE query. No php code is needed. Link to comment https://forums.phpfreaks.com/topic/222315-php-variables/#findComment-1149978 Share on other sites More sharing options...
princeofpersia Posted December 21, 2010 Author Share Posted December 21, 2010 sorted thanks Link to comment https://forums.phpfreaks.com/topic/222315-php-variables/#findComment-1149982 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.