losing variables between php brackets


Posted on 16th Feb 2014 07:03 pm by admin

Hi

have got this code:
Code: $id=mysql_result($result,0,"itemid");
$title=mysql_result($result,0,"title");
$thumbnail=mysql_result($result,0,"data_txt");
$publish_up=mysql_result($result,0,"publish_up");
$hits=mysql_result($result,0,"hits");
echo $title;
?>


<h2>
<a href="#">
<?php $title; ?>
</a>
</h2>

This is a simplified version, but the second use of $title doesn't work at all, just returns blank, whereas the first does? Is there some rule about variables being lost across <?php ?> tags or something?

No comments posted yet

Your Answer:

Login to answer
173 Like 20 Dislike
Previous forums Next forums
Other forums

Loop column after 2 results
Hello All.

Here is what I have:

Client ID Company name Clien

search query in mysql in php problem
my search query wont work, i know, that my codes are correct.please help

Code: [Select]&l

Add "width" check when upload
Hi!

Can someone add a function that is checking if picture witdh is bigger then 800px whwn up

Save cookie to DB
I'm working on a pixel tracking script for an incentive website and I need to use an ASP script to s

Grabbing Values From an Array for Posting
I have a grid array that I am using with a form that when it hits the currently named test.php it lo

Automatic Webpage ??
I have a page www.mysite.com/test.php with a
<form>
<textarea name=&q

Drop Down and text box issue
Is it possible to set a drop down list and text boxes to a certain width?

here is my code

JQuery, Masterpage, and Control issue
Hey everyone, I am using JQuery in several sites so I thought it would be best to place the library

PHP mail() returns true but doesn't work
First off I apologize if this is a newbie question, and I generally don't like asking questions that

eregi to preg
Im converting my regex for php 5.3 and I am stuck on the following

Code: [Select]if((eregi(&q

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash