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? Quote 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. Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/222315-php-variables/#findComment-1149982 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.