Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-22-2011, 07:42 PM   PM User | #1
lamasu
New to the CF scene

 
Join Date: Dec 2010
Posts: 9
Thanks: 2
Thanked 0 Times in 0 Posts
lamasu is an unknown quantity at this point
Angry 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
lamasu is offline   Reply With Quote
Old 09-22-2011, 08:13 PM   PM User | #2
mlseim
Master Coder

 
mlseim's Avatar
 
Join Date: Jun 2003
Location: Cottage Grove, Minnesota
Posts: 9,045
Thanks: 8
Thanked 1,029 Times in 1,020 Posts
mlseim has a spectacular aura aboutmlseim has a spectacular aura aboutmlseim has a spectacular aura about
Show us the function.
If the function is outputting stuff (echo), then that's your problem.
mlseim is offline   Reply With Quote
Users who have thanked mlseim for this post:
lamasu (09-22-2011)
Old 09-22-2011, 08:21 PM   PM User | #3
myfayt
Senior Coder

 
Join Date: Apr 2010
Posts: 1,156
Thanks: 46
Thanked 95 Times in 94 Posts
myfayt can only hope to improve
Are you naming your div tags?
myfayt is online now   Reply With Quote
Old 09-22-2011, 11:10 PM   PM User | #4
lamasu
New to the CF scene

 
Join Date: Dec 2010
Posts: 9
Thanks: 2
Thanked 0 Times in 0 Posts
lamasu is an unknown quantity at this point
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
lamasu is offline   Reply With Quote
Reply

Bookmarks

Tags
function, function(), functions

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:45 PM.


Advertisement
Log in to turn off these ads.