hoopplaya4 Posted January 22, 2009 Share Posted January 22, 2009 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 More sharing options...
premiso Posted January 23, 2009 Share Posted January 23, 2009 <?php $number = 1; echo '<a href="redirect.php?num=' . ($number+1).'">Add Event</a>'; ?> Close... Link to comment https://forums.phpfreaks.com/topic/142048-solved-add-integer-to-a-variable/#findComment-743831 Share on other sites More sharing options...
hoopplaya4 Posted January 23, 2009 Author Share Posted January 23, 2009 Teriffic! Thanks, premiso. Link to comment https://forums.phpfreaks.com/topic/142048-solved-add-integer-to-a-variable/#findComment-743832 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.