arianhojat Posted April 4, 2007 Share Posted April 4, 2007 <?php $oldRoutedTo = 379; echo '$oldRoutedTo='. $oldRoutedTo .'<br/>'; $routedTo = $oldRouterTo; echo '$routedTo='. $routedTo .'<br/>'; ?> for me this outputs $oldRoutedTo=379 $routedTo= shouldnt $routedTo=379?!?!?! thanks in advance, hopefully if i am doing something real dumb in the morning. Link to comment https://forums.phpfreaks.com/topic/45567-solved-variable-problem-got-to-be-something-simple/ Share on other sites More sharing options...
arianhojat Posted April 4, 2007 Author Share Posted April 4, 2007 weird... if i renamed $oldRoutedTo=379 to $old, it works. then if i rename back to $oldRoutedTo, it works. errrrr hate peoblems like this that make no sense. Could php somehow cache variables heh? Link to comment https://forums.phpfreaks.com/topic/45567-solved-variable-problem-got-to-be-something-simple/#findComment-221252 Share on other sites More sharing options...
aebstract Posted April 4, 2007 Share Posted April 4, 2007 <?php $oldRoutedTo = '379'; echo "$oldRoutedTo"; $routedTo = "$oldRoutedTo"; echo "$routedTo"; ?> Both should echo 379 in this example? I am not sure what you actually want it to do, hopefully this is it. Link to comment https://forums.phpfreaks.com/topic/45567-solved-variable-problem-got-to-be-something-simple/#findComment-221254 Share on other sites More sharing options...
kenrbnsn Posted April 4, 2007 Share Posted April 4, 2007 You misspelled the variable in this line: <?php $routedTo = $oldRouterTo; ?> "$oldRouterTo" != "oldRoutedTo" Ken Link to comment https://forums.phpfreaks.com/topic/45567-solved-variable-problem-got-to-be-something-simple/#findComment-221294 Share on other sites More sharing options...
arianhojat Posted April 4, 2007 Author Share Posted April 4, 2007 DOH, haha!, errr i need glasses. Link to comment https://forums.phpfreaks.com/topic/45567-solved-variable-problem-got-to-be-something-simple/#findComment-221328 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.