PDA

View Full Version : PHP Minus a Number



ianhull
05-13-2006, 05:33 PM
How do I minus a number?

I have 99 but I need to take away 1 and make it 98

please help.

Thanks

Corey
05-13-2006, 05:37 PM
myNum = 99;
myNum = myNum - 1;

ianhull
05-13-2006, 05:38 PM
Corey You the Man:yes :yes :yes

Thanks,

So Simple but if you don't know it's hard.

Thanks again

Corey
05-13-2006, 05:43 PM
No problem. :)

ianhull
05-15-2006, 09:24 AM
Corey, you there again?

I have another little issue.

I am passing this using the address bar.

tp=template1.swf

I need to strip that down and include a form based on the number passed.

include_once("includes/form#.php");

Any help much appreciated.

Thanks

ianhull
05-15-2006, 09:37 AM
I just tried with this but its wrong somewhere.

<?php $firsttrim = trim($_GET['tempate'], "template");?><br /><?php echo trim($firstrim, ".swf");?>


Worked it out now.

<?php $firsttrim = trim($_GET['tempate'], "template");?><br /><?php echo trim($firsttrim, ".swf");?>