Q695 Posted March 28, 2009 Share Posted March 28, 2009 what's going wrong here: echo $location_x. $location_y;// works here function create_map($location_x, $location_y){ echo $location_x. $location_y;//doesn't work here Link to comment https://forums.phpfreaks.com/topic/151470-solved-not-passing-data-into-function/ Share on other sites More sharing options...
ratcateme Posted March 28, 2009 Share Posted March 28, 2009 can we see some more like the full function declaration and how you are calling it. Scott. Link to comment https://forums.phpfreaks.com/topic/151470-solved-not-passing-data-into-function/#findComment-795594 Share on other sites More sharing options...
Q695 Posted March 28, 2009 Author Share Posted March 28, 2009 you could, if you want to see 242 lines, because it is being passed in with php. Link to comment https://forums.phpfreaks.com/topic/151470-solved-not-passing-data-into-function/#findComment-795596 Share on other sites More sharing options...
ratcateme Posted March 28, 2009 Share Posted March 28, 2009 well i kind of need something more than what you have given us could you try and simpfly it down and just the line where it is called and the lines where $location_x and $location_y are defined Scott. Link to comment https://forums.phpfreaks.com/topic/151470-solved-not-passing-data-into-function/#findComment-795598 Share on other sites More sharing options...
Q695 Posted March 28, 2009 Author Share Posted March 28, 2009 they're defined when the database pulls the user info. Link to comment https://forums.phpfreaks.com/topic/151470-solved-not-passing-data-into-function/#findComment-795602 Share on other sites More sharing options...
chmpdog Posted March 28, 2009 Share Posted March 28, 2009 Php dosnt know to include the variable in the function. Either set the variable in the function or use this inside the function: global $myvar; Link to comment https://forums.phpfreaks.com/topic/151470-solved-not-passing-data-into-function/#findComment-795608 Share on other sites More sharing options...
Q695 Posted March 28, 2009 Author Share Posted March 28, 2009 thanks chmpdog Link to comment https://forums.phpfreaks.com/topic/151470-solved-not-passing-data-into-function/#findComment-795610 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.