User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 397,168 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,461 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting

using statements in user defined functions

Join Date: Mar 2007
Location: georgia
Posts: 55
Reputation: hunkychop is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 4
hunkychop's Avatar
hunkychop hunkychop is offline Offline
Junior Poster in Training

Re: using statements in user defined functions

  #6  
Mar 28th, 2008
i dont need to "technicaly" or "directly" manipulate the html, i just need to grab the html and then echo it modified.

let me rephrase this...

when i run this....
<?php function test(){ ?>
data
<?php } ?>

everytime a run test() in php, the html outside of the tags is outputted (data)

i want to take the data in test() and be able to do anything with it that i could do with a normal string.

i DO NOT want to do this.
echo "html here..";

or

<?php
$data = <<<_
html here...
_;
echo $data;
?>

i want to have the text outside of the php tags, grab it, and put it into string so i can echo it later. I cant quite phrase why i need to have the origional html outside of the php tags but you will just have to trust me that it is what i want. I dont know if i am on the right track with using a function to get the data, but i cant find any other way to get it,

i have tried doing something like this: <?php function test(){ return ?>html here...<?php ; } ?>
but nothing is returned.

Thanks for your help so far.
Last edited by hunkychop : Mar 28th, 2008 at 6:54 pm.
toast
Reply With Quote  
All times are GMT -4. The time now is 3:58 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC