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");
Did you know?Explore Trending and Topic pages for more stories like this.
$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

IF STATEMENT HELP
Hi
i have created a calendar from a table:

Code: Calendar: October 2009
<table w

mysql timestamp manipulation
How could I use a timestamp (e.g 2009-10-30 13:20:35 ), and with php find out if it is:

from

dynamic table with forms
I have a table that is populated with mysql data and in teh first column there is a raido button tha

Need help/w Page: 1,2,3,4 function!
So I have this code im working on where it's ment to display seperate pages having 20 logs each
I

Stopping page post back
I have few literal contriols in my page and a repeater too. But inspite of using update panel, postb

System copy error in RUN ABAP REPORT PHASE
Hi,
I am performing system copy on my test server. I have previously taken export of JAVA + A

New Login Script
Hi all, i attempted to create a whole new login script witch isnt working for some reason i dont kno

Beginners syntax and loop questions - help please!
Hi everyone,

I have some problems with php code. I'm currently in the middle of learning php,

php ajax - two drop down list with a submit button
i have created a form with 2 drop-down list and a submit button. I would like to know how to pass th

Problem in OnClientClick and OnClick sync
Hi,Strange and irritating problem: I have below button declaration in markup of the aspx page:

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