Trouble with Concatenation
Posted: Mon Jun 22, 2009 2:38 am
Hello Everyone!
I'm very new to PHP, and it's making concatenation extremely frustrating.
I have scrolling news stories on my website, whereby a user clicks a headline button and moves the corresponding story into view.
Each story looks like so:
<div id="story1">
<h1>Headline 1</h1>
<p>Text1 text1 text1</p>
</div>
And each button looks like so:
<div id="button1">Headline 1</div>
I'm trying to use PHP to generate a new div and new button for each story in the database.
I've looked at the do...while loop, which seems to make sense, but I keep getting nothing but errors from the browser.
Could somebody please show me the syntax for adding a new <div> block (with any h1's and p's) for each record?
I thank you for your time.
Arlen
I'm very new to PHP, and it's making concatenation extremely frustrating.
I have scrolling news stories on my website, whereby a user clicks a headline button and moves the corresponding story into view.
Each story looks like so:
<div id="story1">
<h1>Headline 1</h1>
<p>Text1 text1 text1</p>
</div>
And each button looks like so:
<div id="button1">Headline 1</div>
I'm trying to use PHP to generate a new div and new button for each story in the database.
I've looked at the do...while loop, which seems to make sense, but I keep getting nothing but errors from the browser.
Could somebody please show me the syntax for adding a new <div> block (with any h1's and p's) for each record?
I thank you for your time.
Arlen