PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hey guys. Im having some trouble. First here is the error.
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/gtcave/public_html/pspcave/components/com_content/content.html.php
Basically i want it to check the section id and if its a certain section i want it to print the code. Like if sectionid=1 i want it to use a different css class and if sectionid=18 i want it to use a different css class.
Then i made the php code to determine what class to use. The code actually ends up showing a small 30x30 image which is displayed next to article titles. before it just used to show one image, but with Astions solution it makes the page 3 times wider and the images show itself like 1000 times now...
Your not echo'ing rows. Your only echo'ing columns. You need some <tr>'s in there I imagine. All I did was clean up and fix your code. I didn't change it at all. As feyd said, you also need == in comparison operations, otherwise your just assigning the value to the variable, not comparing it.
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi there, Im STILL at this would you believe. I really need to get this working, so if you can help that would be grateful!
Here is the current code. Which may still be wrong.
.contentheading {
height: 30px;
background: url(../images/contenthead.jpg) top left repeat-x;
color: #0033FF;
text-indent: 15px;
font-weight: bold;
font-size: 15px;
}
.contentheadingps3 {
height: 30px;
background: url(../images/contentheadps3.jpg) top left repeat-x;
color: #0033FF;
text-indent: 15px;
font-weight: bold;
font-size: 15px;
}
But now take a look here http://www.pspcave.com and look at the blue images going down the page there, should only be one.
(Can somone help asap as i cant leave the site like this for too long so i can revert to the previous code which is
<td class="contentheading<?php echo $params->get( 'pageclass_sfx' ); ?>" width="90%"> and that usually worked before but i need the advanced code above working as its different.)
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
oh ok, why does that happen? And how would i solve this problem? I take it you see what im trying to do here? Please help me find a solution, i need to finish this in the next few hours.