Monday 30 July 2018

html - PHP echo H1 depending on page

How can i echo a h1 depending on the variable set on the page? The script below is breaking my page. Looks like my syntax is incorrect







if($page =="home_page") {echo "

" 'Mountain ' "

"; }
else if($page =="parts") {echo "

" 'parts ' "

"; }

else if($page =="cars") {echo "

" 'cars ' "

"; }

?>





Many thanks,
P

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...