Jump to content

variables!


oobradersoo

Recommended Posts

Depends on what you mean by 'link them into one variable'.

//You can add/subtract/divide/multiply them all, as suggested by kadeous
$wholenumber = $number1 + number2 + $number3 + $number4;
$wholenumber = $number1 - number2 - $number3 - $number4;
$wholenumber = $number1 / number2 / $number3 / $number4;
$wholenumber = $number1 * number2 * $number3 * $number4;
 
//You can concatenate them
$wholenumber = $number1 . $number2 . $number3 . $number4
 
//You can put them into an array
$wholenumber = array(
    $number1, $number2, $number3, $number4
);

Those are three very basic things that you could do to 'link' them, which is all we can really suggest without more information as to what you actually want

 

Denno

Link to comment
https://forums.phpfreaks.com/topic/285659-variables/#findComment-1466486
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.