bambinou
04-06-2010, 08:03 PM
Hi,
I am on a very basic level of programming, I decided to do more work on my own, I am ok with CSS and html, now I struggle with PHP.
I would like to understand the principal of $variables, let's say I have the code below(only partial code):
<table>
<tr>
<td width='250'><b>Band Name:</b><br>
".$artistInfo['artist_band_name']."
</td>
<td align='left' width='191'>".$moreReviewLink."</td>
</tr><tr>
<td colspan = '2'> </td>
</tr>
<tr width='441' height = '130'>
<td colspan = '2' valign='top'> <b>Review: </b>
<br>".$reviewInformation[$i]['review_text']."</td></tr></table></td></tr>
</table></a>";
echo "<li style='overflow: hidden; float: left; width: 579px; height: 312px;' class='carousel-mainMod-panel'>".$strTabular."</li>";
If If I wanted to add some text just below the "$review Information" how could I do this?
How does a variable works? how to create a text and then put the full text in one single variable, this way I dont have to copy all the text each time but just add an echo statemen instead.
I hope you understand what I mean but I also hope I have not misunderstood what a PHP variable is used for.
I would really like to be able to show a full text through a variable.
Now I explain why I am looking at having a variable in the text above, the way the code works is, people can post a review on my site from time to time, but, I want to add some publicity at the end of all the reviews, now I have been trying to add pure html code with an echo statement to the code above but the problem is that my code shows only once and is not repeated on each review, therefore, I believed that having a variable instead would enable the code to repeat this action each time a review is written.....I hope I am right :-)
Regards,
BamBam
I am on a very basic level of programming, I decided to do more work on my own, I am ok with CSS and html, now I struggle with PHP.
I would like to understand the principal of $variables, let's say I have the code below(only partial code):
<table>
<tr>
<td width='250'><b>Band Name:</b><br>
".$artistInfo['artist_band_name']."
</td>
<td align='left' width='191'>".$moreReviewLink."</td>
</tr><tr>
<td colspan = '2'> </td>
</tr>
<tr width='441' height = '130'>
<td colspan = '2' valign='top'> <b>Review: </b>
<br>".$reviewInformation[$i]['review_text']."</td></tr></table></td></tr>
</table></a>";
echo "<li style='overflow: hidden; float: left; width: 579px; height: 312px;' class='carousel-mainMod-panel'>".$strTabular."</li>";
If If I wanted to add some text just below the "$review Information" how could I do this?
How does a variable works? how to create a text and then put the full text in one single variable, this way I dont have to copy all the text each time but just add an echo statemen instead.
I hope you understand what I mean but I also hope I have not misunderstood what a PHP variable is used for.
I would really like to be able to show a full text through a variable.
Now I explain why I am looking at having a variable in the text above, the way the code works is, people can post a review on my site from time to time, but, I want to add some publicity at the end of all the reviews, now I have been trying to add pure html code with an echo statement to the code above but the problem is that my code shows only once and is not repeated on each review, therefore, I believed that having a variable instead would enable the code to repeat this action each time a review is written.....I hope I am right :-)
Regards,
BamBam
