CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   PHP (http://www.codingforums.com/forumdisplay.php?f=6)
-   -   PHP Function going crazy!! (http://www.codingforums.com/showthread.php?t=238837)

lamasu 09-22-2011 07:42 PM

PHP Function going crazy!!
 
Ok now this is one odd problem I'm having here.
My called PHP functions just go berserk on me, they show up in a completely different DIV than the one they were called from.

I call them like this:
PHP Code:

$time user_times($id,$week);
echo 
'<div>'.$time.'</div>'

And instead of being returned to the DIV the show up in a parent DIV.
Now I've tried all kinds of ways to fix this yet without any result.

Hope you guys can help,

John

mlseim 09-22-2011 08:13 PM

Show us the function.
If the function is outputting stuff (echo), then that's your problem.

myfayt 09-22-2011 08:21 PM

Are you naming your div tags?

lamasu 09-22-2011 11:10 PM

Yes i'am naming the tags they're just an example.
Wow now I feel stupid obviously you can't have a double echo.
My function has got an echo Oops!

Thank you guys


All times are GMT +1. The time now is 08:16 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.