Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Javascript HTML PHP
I am trying to showing news scroling in Index.php but, I am showing the code in my page. Very funny.
Code:
<?
                                          
$query="select * from newsroom order by nwsroom_date desc limit 0,4";
 
$res=mysql_query($query);
 
while($row=mysql_fetch_object($res)){
$e_dat1=$row->nwsroom_date;
list($year, $month, $day) = preg_split('/[: -]/', $e_dat1);
//list ($year, $month, $day) = split ('[-./]', $e_dat1);
$e_dat=$month."-".$day."-".$year;
 
$homenews .='<a class=news href=news_detail.php?nid='.$row->newsroom_id.'>'.$row->nwsroom_title.'</a><br>'.$e_dat.'<br><br>';
 }
?>
 
Please, help me how can I do it ?
Thank you
Posted 1-Aug-13 1:47am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Enable PHP short tags in your php.ini
 
short_open_tag=On
 
or start your code with
<?php
 
also it could be possible, that you don't have php configured at all.
  Permalink  
Comments
UL UL ALBAB at 1-Aug-13 8:19am
   
Thank You...
UL UL ALBAB at 1-Aug-13 8:19am
   
Perfect answer. Thanks Again.
UL UL ALBAB at 1-Aug-13 8:21am
   
I want to learn Symphony Framework in PHP wins 8. Can you all help me ?
Vyacheslav Voronenko at 1-Aug-13 8:24am
   
I believe you have to start from reading http://symfony.com/doc/current/index.html and your own experiments.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 425
1 OriginalGriff 165
2 DamithSL 130
3 Dave Kreskowiak 120
4 Suvendu Shekhar Giri 110
0 OriginalGriff 7,645
1 DamithSL 5,614
2 Sergey Alexandrovich Kryukov 5,344
3 Maciej Los 4,961
4 Kornfeld Eliyahu Peter 4,539


Advertise | Privacy | Mobile
Web04 | 2.8.141223.1 | Last Updated 1 Aug 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100