Jump to content

[SOLVED] Add integer to a Variable


hoopplaya4

Recommended Posts

Hi All,

 

I have a variable:

 

<?
$number = 1;

 

And, what I am trying to do is 'add' to it. 

 

For example, I'd like to have:

echo "<a href='redirect.php?num=.$number(+1).'>Add Event</a>

 

Thus, it would display:

 

redirect.php?num=2

 

Is my syntax correct using it the way it is in an "echo" statement?

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/142048-solved-add-integer-to-a-variable/
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.