Skip to content
WJunction - Webmaster Forum

PHP search function problem

Status
Not open for further replies.

cgworld

Experienced Member
566
2010
9
Hello

i have a search function, which when you search its gives you back the results and the search title but the problem is its adding the the <title> my search ... </title> in front of the
<!DOCTYPE HTML PUBLIC " ....>

and it makes the site to show bigger !!

---------------------

here is the function

$findstory = stripslashes( $story );
echo '<title>'.$findstory.' results</title>';

how to make it to echo the title after the
<!DOCTYPE .. > and not before it ?

thanks
 

2 comments

It would totally depend on your script. I've no idea if you've a template system or what.

Basically you could just move this down the page

echo '<title>'.$findstory.' results</title>';

so it appears later or you could have

<title><?=$findstory?> results</title>
or <title><?php $findstory ?> results</title> further down the page depending on your settings and remove the line further up
echo '<title>'.$findstory.' results</title>';

Ahh their's lots of ways. Would really need to see it in context.
 
Status
Not open for further replies.

About the author

C
Experienced Member · Joined
566
Messages
9
Reactions
18
Points
Grow your business

Advertise on WJunction

Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.

  • Premium & Premium+ Sticky
  • Dedicated section banners
  • Site-wide banner advertising
Explore advertising options
Back
Top Bottom