December 18th, 2012, 03:41 PM
Hmm didn't work
I got the following in the html
as in php coding like the following
The css is as following
Print "<tr><th class='thtestimonial'>Testimonial:</th> <td> ".$testimonials['testimonial'] . "<br><br></td></tr>";
in the coding but got error's as is in the php coding
December 18th, 2012, 03:49 PM
HEY! YOU! Read the New User Guide and Forum Rules
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin
"The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002
Think we're being rude? Maybe you asked a bad question
or you're a Help Vampire.
Trying to argue intelligently? Please read this.
December 18th, 2012, 03:52 PM
Ok cool this is the error I got when I do it this way
Parse error: syntax error, unexpected T_STRING in /customers/0/c/c/irhwebsites.co.uk/httpd.www/html5 think simple/testimonials.php on line 72
on line 72 is the following
Print "<tr><th class="thtestimonial">Testimonial:</th> <td> ".$testimonials['testimonial'] . "<br><br></td></tr>";
December 18th, 2012, 04:20 PM
Print "<tr><th class="thtestimonial">
You cannot nest double-quotes inside double-quotes in this way. Change to 'thtestimonial' or \"thtestimonial\".
Hint: I would use class 'testim' or some other more informative name - if you are constantly typing t-e-s-t-i-m-o-n-i-a-l you are sure to mistype it at some point
December 18th, 2012, 04:22 PM
The issue there is that you are trying to use double quotes within double quotes, so when the php gets to the 2nd double quote it reads it as the end of the string. So what should follow is a semi-colon or comma or concatenation or anything else you can use in conjunction with ending strings, but as we see, it follows with another string so this is the reason for the error.
You definitely need single quotes around your class attribute's value.
December 18th, 2012, 04:37 PM
I have done it a different way now - see link below
I just need a couple of link breaks after each testimonial and not sure how to do it, do I need something like
or will that not work
December 18th, 2012, 04:47 PM
Yes, that will insert line-breaks into the HTML.. if you insert it in the right place . Personally, I would use CSS
padding: 20px 0;
Last edited by AndrewSW; December 18th, 2012 at 04:49 PM.
December 18th, 2012, 04:48 PM
ok so use something like margin-bottom in css, that right?
December 18th, 2012, 04:51 PM
padding: 20px 0;
December 18th, 2012, 04:52 PM
That css worked perfect, thank you so much really appreciate it and for all your help and time