Jump to content

butsags

Members
  • Posts

    33
  • Joined

  • Last visited

    Never

Everything posted by butsags

  1. Are you set on using php? I've run into problems a few times while using multiple header() calls and needed a resort. Try javascript. window.location = "http://www.google.com/" you can attach it to a link: <a href="javascript:window.location = 'http://www.google.com/'">Go</a> or add this into the header tag and it will redirect automatically: <script type="text/javascript"> <!-- window.location = "http://www.google.com/" //--> </script> This should be more universal
  2. Thanks man it worked perfectly. I didn't even know that such a thing as modulus exsisted (-__-) i need to go to college Hhaha, Thanks for your help my friend.
  3. Thanks for your reply man, im getting an error on $chunks = int($OrderWeight / 150); I think because int cant be used by itself like that. the error is saying its an undefined function ha. and presuming that that worked, now how would i print out however many chunks of 150 or less there are? something like an array and then a while (($i=0;$i<count($chunkarray);$i++)){echo "".$chunkarray[$i]."";}
  4. Hey guys, So i have a variable that i want to check. I want the script to check if a number is over 150 then break it down into multiple numbers each up to 150. so if the number is 900, there will be six chunks of 150. if the number is say 800, there will be 5 chunks of 150 and one chunk of 50. etc something like: <?php if($OrderWeight > 150){ $OrderWeight = explode("150", '$OrderWeight'); $i=0; while ($i < $OrderWeight) { $OrderWeight[$i]; } } else { } ?> Thanks Guys. I feel like this is a very simple equation, I'm just missing a simple php function
×
×
  • 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.