PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > How-to Forum

Reply
 
Thread Tools
Old 10-05-2005, 02:06 AM   #1
JonnyNoog
Green Mole
 
Join Date: Oct 2005
Posts: 12
return statement question

Hello,

I am trying to create a custom search results template for my site. I have found and read this thread and have successfully made the changes required up to the point where everything seems to be working except that I am getting some unexpected "1" characters displayed. From reading the before mentioned thread I gather this problem can be solved by implementing return() but am unsure how to do this. I am something of a php noob so sorry if this is an inane question but any assistance would be greatly appreciated.
JonnyNoog is offline   Reply With Quote
Old 10-05-2005, 06:41 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Assuming you are wanting to include a PHP header and footer, make the PHP files like so, sticking the HTML content into a variable, and then returning that variable:
Code:
<?php

$my_header = <<<END
<html>
<body>
<!-- and so forth -->
END;

return $my_header;

?>
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 10-05-2005, 05:35 PM   #3
JonnyNoog
Green Mole
 
Join Date: Oct 2005
Posts: 12
Talking

Thanks for that Charter, I knew it was an easy fix but just couldn't fit the final puzzle piece. Now I just have to modify the rest of my pages to use the same variable for the includes .
JonnyNoog is offline   Reply With Quote
Reply

Thread Tools

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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Spider & Search the Mirror, return results for Live stabilo How-to Forum 0 12-01-2005 06:27 AM
Unable to return consistent search results danwanner How-to Forum 1 05-03-2005 11:12 AM
allow_url_fopen question cefiro How-to Forum 3 02-21-2005 01:14 PM
question about the installation west Script Installation 1 02-01-2005 10:52 AM
Yet Another indexing question ffe Troubleshooting 4 01-23-2005 07:16 AM


All times are GMT -8. The time now is 01:47 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.