I need some help in php..
For example i have
table1=>
product_id (1,2,3,4,5,6,7,8,9,10)
product_name(a,b,c,d,e,f,g,h,i,j)
--------------------
i need to echo all the products names
foreach()
{
echo...
}
...
but the last 5 (10,9,8,7,6)..to be in another color...how can i ?
I need some help in php..
Moderator: General Moderators
Re: I need some help in php..
Get the number of results, create a loop counter, and once your loop counter reaches [number of results - 5] then add the additional style.
Re: I need some help in php..
Hi,try this
And the css class should be
Code: Select all
<?php
$product_name = array("a","b","c","d","e","f","g","h","i","j");
//print_r($product_name);
$counter = 0;
foreach($product_name as $p){
$counter++;
if($counter <=5){
echo '<div class="style">'.$p.'</div>';
}
else{
echo '<div class="style1">'.$p.'</div>';
}
}
?>
Code: Select all
.style{
color:red;
}
.style1{
color:green;
}
Re: I need some help in php..
i have this php code goseph, i couldnt success to attach your code to my code:
Code: Select all
<?php
$query = mysql_query("SELECT * FROM pages WHERE pages_appearance='yes' ORDER BY pages_id DESC LIMIT $start,$per_page");
while($lval = mysql_fetch_assoc($query)){
if($art_data){
//asm3.... shaief al $lval t7t?
//lazm aghaiera la $query_row ? msh ahwan? :D hhhhhh :P! bshrfe ennak nemer beqe bs ae3atsev aotam :D s
$desc = $lval['pages_header'];
$desc2 = $lval['pages_text'];
$title1 = substr($desc2,0,22);
$title2 = substr($desc,0,37);
$thecateg = $lval['thecategory'];
$thelocation = $lval['pages_location'];
$thetown = $lval['pages_town'];
$thesubcat = $lval['pages_subcat'];
mysql_query("SET NAMES 'utf8'");
$sql=mysql_query("SELECT * FROM categories,pages WHERE categories.Id = pages.thecategory AND categories.Id='$thecateg'");
$result23=mysql_fetch_assoc($sql);
$sql2=mysql_query("SELECT location_name FROM locations,pages WHERE locations.location_id='$thelocation'");
$resultloc=mysql_fetch_assoc($sql2);
$sql3=mysql_query("SELECT subt_name FROM sub_towns,pages WHERE sub_towns.subt_id='$thetown'");
$resulttown=mysql_fetch_assoc($sql3);
$sql4=mysql_query("SELECT sub_name FROM sub_categories,pages WHERE sub_categories.sub_id='$thesubcat'");
$resultsubcat=mysql_fetch_assoc($sql4);
//**************** pic:yes / paid:no ******************************************************************************************
if(($lval['pages_isthere_pic'] == 'yes')&&($lval['pages_paid'] == 'no'))
echo '<div class="div1" adid="'.$lval['pages_id'].'">
<table border="0" width="710px;" height="30px" id="table1" cellspacing="0" cellpadding="0" style="text-align:center;">
<tr>
<td style="width:100px;"><p style="line-height:3px; color:white;"><a href="add_to_cart.php?id='.$lval['pages_id'].'" style="color:white; text-decoration:underline;">إضافة للمفضله</a></p></td>
<td style="width:100px;"><p style="line-height:3px; color:white;">'.$result23['category_name'].'</p></td>
<td style="width:170px;"><p style="line-height:3px; color:white;">'.$resultloc['location_name'].'</p></td>
<td style="width:100px;"><p style="line-height:3px; color:white;"> '.$title1.'</p></td>
<td style="width:100px;"><p style="line-height:3px; color:white;">'.$lval['pages_price'].'</p></td>
<td style="width:30px;"><img src="images/pictures_icon.png" width="21" height="17" border="0" alt=""></td>
<td style="width:106px;"><p style="line-height:3px; color:white;">'.$lval['pages_date'].'</p></td>
</tr>
</table>
</div>
<div style=";
width:710px;
height:380px;
display:none;
float:right;
margin-bottom:3px;
font-family:tahoma;
text-align:right;
background-color:#eeeeee;
" class="div2" id="div2_'.$lval['pages_id'].'" dir="ltr">
<!-- div 1 -->
<div style="background:none repeat scroll 0 0 #eeeeee; width:225px; height:auto; overflow-x: hidden; overflow-y: auto; margin-top:5px; margin-left:5px; float:left;">
<table style="border-collapse: collapse;
color: #000000;
direction: rtl;
font-family: arial;
font-size: 12px;
font-weight: normal;
margin: 0 18px 0 0 !important;
padding-bottom: 5px !important;
padding-left: 0;
padding-right: 0;
padding-top: 8px !important;">
<tr><td style="background-image:url(http://topline.me/yad2/images/reka3.jpg); width:225; height:22px; color:white; border-radius:5px 5px 5px 5px; font-family:tahoma; text-align:right;">معلومات الاتصال</td></tr>
<tr>
<td>
<div style="width: 200px; height:117px; word-wrap: break-word; font-family:tahoma; background-color:#ffffff;">
<b>الدولة:</b>'.$resultloc['location_name'].' </br>
<b>بلد:</b>'.$resulttown['subt_name'].' </br>
<b>تلفون:</b><a style="color:red; font-weight:bold; cursor:pointer;" id="adher" onclick="this.innerHTML=\''.$lval['pages_pele1'].'\'">أظهر الرقم</a></br>
<b>البائع:</b>'.$lval['pages_name'].' </br>
</div>
</td>
</tr>
</table>
</div>
<!-- div 2 -->
<div style="background:none repeat scroll 0 0 #eeeeee; width:225px; height:auto; overflow-x: hidden; overflow-y: auto; margin-top:5px; margin-right:5px; float:right;">
<table style="border-collapse: collapse;
color: #000000;
direction: rtl;
font-family: arial;
font-size: 12px;
font-weight: normal;
margin: 0 18px 0 0 !important;
padding-bottom: 5px !important;
padding-left: 0;
padding-right: 0;
padding-top: 8px !important;">
<tr><td style="background-image:url(http://topline.me/yad2/images/reka3.jpg); width:225; height:22px; color:white; border-radius:5px 5px 5px 5px; font-family:tahoma;">تفاصيل المنتوج</td></tr>
<tr>
<td>
<div style="width: 200px; height:100px; word-wrap: break-word; font-family:tahoma; background-color:#ffffff;">
<b>القسم:</b>'.$result23['category_name'].' </br>
<b>المنتوج/الغرض:</b>'.$resultsubcat['sub_name'].' </br>
</div>
</td>
</tr>
<tr><td style="background-color:#62c7fc; font-family:tahoma; color:black;">السعر: '.$lval['pages_price'].' ₪</td></tr>
</table>
</div>
<!-- div 3 -->
<div style="background:none repeat scroll 0 0 #eeeeee; width:225px; height:auto; overflow-x: hidden; overflow-y: auto; margin-top:5px; margin-left:auto; margin-right:auto;">
<table style="border-collapse: collapse;
color: #000000;
direction: rtl;
font-family: arial;
font-size: 12px;
font-weight: normal;
margin: 0 18px 0 0 !important;
padding-bottom: 5px !important;
padding-left: 0;
padding-right: 0;
padding-top: 8px !important;">
<tr><td style="background-image:url(http://topline.me/yad2/images/reka3.jpg); width:225; height:22px; color:white; border-radius:5px 5px 5px 5px; font-family:tahoma;">تفاصيل اوفى</td></tr>
<tr>
<td>
<div style="width: 200px; height:117px; word-wrap: break-word; background-color:#ffffff; font-family:tahoma;">
<!-- page note ************************************************************************************************* -->
'.$lval['pages_note'].'
</div>
</td>
</tr>
</table>
</div>
<!-- div 1 -->
<div style="background:none repeat scroll 0 0 #eeeeee; width:710px; height:auto; overflow-x: hidden; overflow-y: auto; margin-top:10px; margin-left:auto; margin-right:auto; float:left;">
<table>
<tr>
<td><table>
<tr>
<td><a href="'.$lval['pages_pic'].'" rel="group"><img src="'.$lval['pages_pic'] .'" width="165" height="165" border="0" alt=""></a></td>
<td><a href="'.$lval['pages_pic2'].'" rel="group"><img src="'.$lval['pages_pic2'] .'" width="165" height="165" border="0" alt=""></a></td>
<td><a href="'.$lval['pages_pic3'].'" rel="group"><img src="'.$lval['pages_pic3'] .'" width="165" height="165" border="0" alt=""></a></td>
<td><a href="'.$lval['pages_pic4'].'" rel="group"><img src="'.$lval['pages_pic4'] .'" width="165" height="165" border="0" alt=""></a></td>
</tr>
</table></td>
</tr>
<tr>
<td><table>
<tr>
<td style="width:165 px; background-color:white;"><a name="fb_share" type="icon_link"
share_url="http://topline.me/yad2/product.php?ID='.$lval['pages_id'].'" style="background-color:#5f7ab1; color:white; text-decoration:none; font-size:12px;">مشاركة</a>
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share"
type="text/javascript">
</script></td>
<td style="width:165 px; background-color:white;"><A HREF="javascript:window.print()"><img src="images/print.png" width="32" height="32" border="0" alt=""></A></td>
<td style="width:165 px; background-color:white;"><b style="color:green; font-size:12px;">رقم المنتوج:</b><span style="color:blue;">'.$lval['pages_id'].' </span></td>
</tr>
</table></td>
</tr>
</table>
</div>
</div>
';
//**************** pic:yes / paid:yes ******************************************************************************************
if(($lval['pages_isthere_pic'] == 'yes')&&($lval['pages_paid'] == 'yes'))
echo '<div class="div1" style="background-color:#dddddd;" adid="'.$lval['pages_id'].'">
<table border="0" width="710px;" height="30px" id="table1" cellspacing="0" cellpadding="0" style="text-align:center;">
<tr>
<td style="width:100px;"><p style="line-height:3px; color:black;"><a href="add_to_cart.php?id='.$lval['pages_id'].'" style="color:black; text-decoration:underline;">إضافة للمفضله</a></p></td>
<td style="width:100px;"><p style="line-height:3px; color:black;">'.$result23['category_name'].'</p></td>
<td style="width:170px;"><p style="line-height:3px; color:black;">'.$resultloc['location_name'].'</p></td>
<td style="width:100px;"><p style="line-height:3px; color:black;"> '.$title1.'</p></td>
<td style="width:100px;"><p style="line-height:3px; color:black;">'.$lval['pages_price'].'</p></td>
<td style="width:30px;"><img src="images/pictures_icon.png" width="21" height="17" border="0" alt=""></td>
<td style="width:106px;"><p style="line-height:3px; color:black;">'.$lval['pages_date'].'</p></td>
</tr>
</table>
</div>
<div style=" background-color:#eeeeee;
width:710px;
height:380px;
display:none;
float:right;
margin-bottom:3px;
font-family:tahoma;
text-align:right;
color:gray;" class="div2" id="div2_'.$lval['pages_id'].'">
<!-- div 1 -->
<div style="background:none repeat scroll 0 0 #eeeeee; width:225px; height:auto; overflow-x: hidden; overflow-y: auto; margin-top:5px; margin-left:5px; float:left;">
<table style="border-collapse: collapse;
color: #000000;
direction: rtl;
font-family: arial;
font-size: 12px;
font-weight: normal;
margin: 0 18px 0 0 !important;
padding-bottom: 5px !important;
padding-left: 0;
padding-right: 0;
padding-top: 8px !important;">
<tr><td style="background-image:url(http://topline.me/yad2/images/reka3.jpg); width:225; height:22px; color:white; border-radius:5px 5px 5px 5px; font-family:tahoma; text-align:right;">معلومات الاتصال</td></tr>
<tr>
<td>
<div style="width: 200px; height:117px; word-wrap: break-word; font-family:tahoma; background-color:#ffffff;">
<b>الدولة:</b>'.$resultloc['location_name'].' </br>
<b>بلد:</b>'.$resulttown['subt_name'].' </br>
<b>تلفون:</b><a style="color:red; font-weight:bold; cursor:pointer;" id="adher" onclick="this.innerHTML=\''.$lval['pages_pele1'].'\'">أظهر الرقم</a></br>
<b>البائع:</b>'.$lval['pages_name'].' </br>
</div>
</td>
</tr>
</table>
</div>
<!-- div 2 -->
<div style="background:none repeat scroll 0 0 #eeeeee; width:225px; height:auto; overflow-x: hidden; overflow-y: auto; margin-top:5px; margin-right:5px; float:right;">
<table style="border-collapse: collapse;
color: #000000;
direction: rtl;
font-family: arial;
font-size: 12px;
font-weight: normal;
margin: 0 18px 0 0 !important;
padding-bottom: 5px !important;
padding-left: 0;
padding-right: 0;
padding-top: 8px !important;">
<tr><td style="background-image:url(http://topline.me/yad2/images/reka3.jpg); width:225; height:22px; color:white; border-radius:5px 5px 5px 5px; font-family:tahoma;">تفاصيل المنتوج</td></tr>
<tr>
<td>
<div style="width: 200px; height:100px; word-wrap: break-word; font-family:tahoma; background-color:#ffffff;">
<b>القسم:</b>'.$result23['category_name'].' </br>
<b>المنتوج/الغرض:</b>'.$resultsubcat['sub_name'].' </br>
</div>
</td>
</tr>
<tr><td style="background-color:#62c7fc; font-family:tahoma; color:black;">السعر: '.$lval['pages_price'].' ₪</td></tr>
</table>
</div>
<!-- div 3 -->
<div style="background:none repeat scroll 0 0 #eeeeee; width:225px; height:auto; overflow-x: hidden; overflow-y: auto; margin-top:5px; margin-left:auto; margin-right:auto;">
<table style="border-collapse: collapse;
color: #000000;
direction: rtl;
font-family: arial;
font-size: 12px;
font-weight: normal;
margin: 0 18px 0 0 !important;
padding-bottom: 5px !important;
padding-left: 0;
padding-right: 0;
padding-top: 8px !important;">
<tr><td style="background-image:url(http://topline.me/yad2/images/reka3.jpg); width:225; height:22px; color:white; border-radius:5px 5px 5px 5px; font-family:tahoma;">تفاصيل اوفى</td></tr>
<tr>
<td>
<div style="width: 200px; height:117px; word-wrap: break-word; background-color:#ffffff; font-family:tahoma;">
<!-- page note ************************************************************************************************* -->
'.$lval['pages_note'].'
</div>
</td>
</tr>
</table>
</div>
<!-- div 1 -->
<div style="background:none repeat scroll 0 0 #eeeeee; width:710px; height:auto; overflow-x: hidden; overflow-y: auto; margin-top:10px; margin-left:auto; margin-right:auto; float:left;">
<table>
<tr>
<td><table>
<tr>
<td><a href="'.$lval['pages_pic'].'" rel="group"><img src="'.$lval['pages_pic'] .'" width="165" height="165" border="0" alt=""></a></td>
<td><a href="'.$lval['pages_pic2'].'" rel="group"><img src="'.$lval['pages_pic2'] .'" width="165" height="165" border="0" alt=""></a></td>
<td><a href="'.$lval['pages_pic3'].'" rel="group"><img src="'.$lval['pages_pic3'] .'" width="165" height="165" border="0" alt=""></a></td>
<td><a href="'.$lval['pages_pic4'].'" rel="group"><img src="'.$lval['pages_pic4'] .'" width="165" height="165" border="0" alt=""></a></td>
</tr>
</table></td>
</tr>
<tr>
<td><table>
<tr>
<td style="width:165 px; background-color:white;"><a name="fb_share" type="icon_link"
share_url="http://topline.me/yad2/product.php?ID='.$lval['pages_id'].'" style="background-color:#5f7ab1; color:white; text-decoration:none; font-size:12px;">مشاركة</a>
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share"
type="text/javascript">
</script></td>
<td style="width:165 px; background-color:white;"><A HREF="javascript:window.print()"><img src="images/print.png" width="32" height="32" border="0" alt=""></A></td>
<td style="width:165 px; background-color:white;"><b style="color:green; font-size:12px;">رقم المنتوج:</b><span style="color:blue;">'.$lval['pages_id'].' </span></td>
</tr>
</table></td>
</tr>
</table>
</div>
</div>';
//**************** pic:no / paid:yes ******************************************************************************************
if(($lval['pages_isthere_pic'] == 'no')&&($lval['pages_paid'] == 'yes'))
echo '<div class="div1" style="background-color:#dddddd;" adid="'.$lval['pages_id'].'">
<table border="0" width="710px;" height="30px" id="table1" cellspacing="0" cellpadding="0" style="text-align:center;">
<tr>
<td style="width:100px;"><p style="line-height:3px; color:black;"><a href="add_to_cart.php?id='.$lval['pages_id'].'" style="color:black; text-decoration:underline;">إضافة للمفضله</a></p></td>
<td style="width:100px;"><p style="line-height:3px; color:black;">'.$result23['category_name'].'</p></td>
<td style="width:170px;"><p style="line-height:3px; color:black;">'.$resultloc['location_name'].'</p></td>
<td style="width:100px;"><p style="line-height:3px; color:black;"> '.$title1.'</p></td>
<td style="width:100px;"><p style="line-height:3px; color:black;">'.$lval['pages_price'].'</p></td>
<td style="width:30px;"><p style="line-height:3px; color:black;">אין</p></td>
<td style="width:106px;"><p style="line-height:3px; color:black;">'.$lval['pages_date'].'</p></td>
</tr>
</table>
</div>
<div style=" background-color:#eeeeee;
width:710px;
height:380px;
display:none;
float:right;
margin-bottom:3px;
font-family:tahoma;
text-align:right;
color:gray;" class="div2" id="div2_'.$lval['pages_id'].'">
<!-- div 1 -->
<div style="background:none repeat scroll 0 0 #eeeeee; width:225px; height:auto; overflow-x: hidden; overflow-y: auto; margin-top:5px; margin-left:5px; float:left;">
<table style="border-collapse: collapse;
color: #000000;
direction: rtl;
font-family: arial;
font-size: 12px;
font-weight: normal;
margin: 0 18px 0 0 !important;
padding-bottom: 5px !important;
padding-left: 0;
padding-right: 0;
padding-top: 8px !important;">
<tr><td style="background-image:url(http://topline.me/yad2/images/reka3.jpg); width:225; height:22px; color:white; border-radius:5px 5px 5px 5px; font-family:tahoma; text-align:right;">معلومات الاتصال</td></tr>
<tr>
<td>
<div style="width: 200px; height:117px; word-wrap: break-word; font-family:tahoma; background-color:#ffffff;">
<b>الدولة:</b>'.$resultloc['location_name'].' </br>
<b>بلد:</b>'.$resulttown['subt_name'].' </br>
<b>تلفون:</b><a style="color:red; font-weight:bold; cursor:pointer;" id="adher" onclick="this.innerHTML=\''.$lval['pages_pele1'].'\'">أظهر الرقم</a></br>
<b>البائع:</b>'.$lval['pages_name'].' </br>
</div>
</td>
</tr>
</table>
</div>
<!-- div 2 -->
<div style="background:none repeat scroll 0 0 #eeeeee; width:225px; height:auto; overflow-x: hidden; overflow-y: auto; margin-top:5px; margin-right:5px; float:right;">
<table style="border-collapse: collapse;
color: #000000;
direction: rtl;
font-family: arial;
font-size: 12px;
font-weight: normal;
margin: 0 18px 0 0 !important;
padding-bottom: 5px !important;
padding-left: 0;
padding-right: 0;
padding-top: 8px !important;">
<tr><td style="background-image:url(http://topline.me/yad2/images/reka3.jpg); width:225; height:22px; color:white; border-radius:5px 5px 5px 5px; font-family:tahoma;">تفاصيل المنتوج</td></tr>
<tr>
<td>
<div style="width: 200px; height:100px; word-wrap: break-word; font-family:tahoma; background-color:#ffffff;">
<b>القسم:</b>'.$result23['category_name'].' </br>
<b>المنتوج/الغرض:</b>'.$resultsubcat['sub_name'].' </br>
</div>
</td>
</tr>
<tr><td style="background-color:#62c7fc; font-family:tahoma; color:black;">السعر: '.$lval['pages_price'].' ₪</td></tr>
</table>
</div>
<!-- div 3 -->
<div style="background:none repeat scroll 0 0 #eeeeee; width:225px; height:auto; overflow-x: hidden; overflow-y: auto; margin-top:5px; margin-left:auto; margin-right:auto;">
<table style="border-collapse: collapse;
color: #000000;
direction: rtl;
font-family: arial;
font-size: 12px;
font-weight: normal;
margin: 0 18px 0 0 !important;
padding-bottom: 5px !important;
padding-left: 0;
padding-right: 0;
padding-top: 8px !important;">
<tr><td style="background-image:url(http://topline.me/yad2/images/reka3.jpg); width:225; height:22px; color:white; border-radius:5px 5px 5px 5px; font-family:tahoma;">تفاصيل اوفى</td></tr>
<tr>
<td>
<div style="width: 200px; height:117px; word-wrap: break-word; background-color:#ffffff; font-family:tahoma;">
<!-- page note ************************************************************************************************* -->
'.$lval['pages_note'].'
</div>
</td>
</tr>
</table>
</div>
<!-- div 1 -->
<div style="background:none repeat scroll 0 0 #eeeeee; width:700px; height:auto; border:1px solid green; overflow-x: hidden; overflow-y: auto; margin-top:10px; margin-left:auto; margin-right:auto;">
<table>
<tr>
<td>xxxxxxxxxxx</td>
</tr>
<tr>
<td><table>
<tr>
<td style="width:165 px; background-color:white;"><a name="fb_share" type="icon_link"
share_url="http://topline.me/yad2/product.php?ID='.$lval['pages_id'].'" style="background-color:#5f7ab1; color:white; text-decoration:none; font-size:12px;">مشاركة</a>
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share"
type="text/javascript">
</script></td>
<td style="width:165 px; background-color:white;"><A HREF="javascript:window.print()"><img src="images/print.png" width="32" height="32" border="0" alt=""></A></td>
<td style="width:165 px; background-color:white;"><b style="color:green; font-size:12px;">رقم المنتوج:</b><span style="color:blue;">'.$lval['pages_id'].' </span></td>
</tr>
</table></td>
</tr>
</table>
</div>
</div>';
//**************** pic:no / paid:no ******************************************************************************************
if(($lval['pages_isthere_pic'] == 'no')&&($lval['pages_paid'] == 'no'))
echo '
<div class="div1" adid="'.$lval['pages_id'].'">
<table border="0" width="710px;" height="30px" id="table1" cellspacing="0" cellpadding="0" style="text-align:center;">
<tr>
<td style="width:100px;"><p style="line-height:3px; color:white;"><a href="add_to_cart.php?id='.$lval['pages_id'].'" style="color:white; text-decoration:underline;">إضافة للمفضله</a></p></td>
<td style="width:100px;"><p style="line-height:3px; color:white;">'.$result23['category_name'].'</p></td>
<td style="width:170px;"><p style="line-height:3px; color:white;">'.$resultloc['location_name'].'</p></td>
<td style="width:100px;"><p style="line-height:3px; color:white;"> '.$title1.'</p></td>
<td style="width:100px;"><p style="line-height:3px; color:white;">'.$lval['pages_price'].'</p></td>
<td style="width:30px;"><p style="line-height:3px; color:white;">אין</p></td>
<td style="width:106px;"><p style="line-height:3px; color:white;">'.$lval['pages_date'].'</p></td>
</tr>
</table>
</div>
<div style=" background-color:#eeeeee;
width:710px;
height:380px;
display:none;
float:right;
margin-bottom:3px;
text-align:right;
font-family:tahoma;
color:gray;" class="div2" id="div2_'.$lval['pages_id'].'">
<!-- div 1 -->
<div style="background:none repeat scroll 0 0 #eeeeee; width:225px; height:auto; overflow-x: hidden; overflow-y: auto; margin-top:5px; margin-left:5px; float:left;">
<table style="border-collapse: collapse;
color: #000000;
direction: rtl;
font-family: arial;
font-size: 12px;
font-weight: normal;
margin: 0 18px 0 0 !important;
padding-bottom: 5px !important;
padding-left: 0;
padding-right: 0;
padding-top: 8px !important;">
<tr><td style="background-image:url(http://topline.me/yad2/images/reka3.jpg); width:225; height:22px; color:white; border-radius:5px 5px 5px 5px; font-family:tahoma; text-align:right;">معلومات الاتصال</td></tr>
<tr>
<td>
<div style="width: 200px; height:117px; word-wrap: break-word; font-family:tahoma; background-color:#ffffff;">
<b>الدوله:</b>'.$resultloc['location_name'].' </br>
<b>بلد:</b>'.$resulttown['subt_name'].' </br>
<b>تلفون:</b><a style="color:red; font-weight:bold; cursor:pointer;" id="adher" onclick="this.innerHTML=\''.$lval['pages_pele1'].'\'">أظهر الرقم</a></br>
<b>البائع:</b>'.$lval['pages_name'].' </br>
</div>
</td>
</tr>
</table>
</div>
<!-- div 2 -->
<div style="background:none repeat scroll 0 0 #eeeeee; width:225px; height:auto; overflow-x: hidden; overflow-y: auto; margin-top:5px; margin-right:5px; float:right;">
<table style="border-collapse: collapse;
color: #000000;
direction: rtl;
font-family: arial;
font-size: 12px;
font-weight: normal;
margin: 0 18px 0 0 !important;
padding-bottom: 5px !important;
padding-left: 0;
padding-right: 0;
padding-top: 8px !important;">
<tr><td style="background-image:url(http://topline.me/yad2/images/reka3.jpg); width:225; height:22px; color:white; border-radius:5px 5px 5px 5px; font-family:tahoma;">تفاصيل المنتوج</td></tr>
<tr>
<td>
<div style="width: 200px; height:100px; word-wrap: break-word; font-family:tahoma; background-color:#ffffff;">
<b>القسم:</b>'.$result23['category_name'].' </br>
<b>المنتوج/الغرض:</b>'.$resultsubcat['sub_name'].' </br>
</div>
</td>
</tr>
<tr><td style="background-color:#62c7fc; font-family:tahoma; color:black;">السعر: '.$lval['pages_price'].' ₪</td></tr>
</table>
</div>
<!-- div 3 -->
<div style="background:none repeat scroll 0 0 #eeeeee; width:225px; height:auto; overflow-x: hidden; overflow-y: auto; margin-top:5px; margin-left:auto; margin-right:auto;">
<table style="border-collapse: collapse;
color: #000000;
direction: rtl;
font-family: arial;
font-size: 12px;
font-weight: normal;
margin: 0 18px 0 0 !important;
padding-bottom: 5px !important;
padding-left: 0;
padding-right: 0;
padding-top: 8px !important;">
<tr><td style="background-image:url(http://topline.me/yad2/images/reka3.jpg); width:225; height:22px; color:white; border-radius:5px 5px 5px 5px; font-family:tahoma;">تفاصيل اوفى</td></tr>
<tr>
<td>
<div style="width: 200px; height:117px; word-wrap: break-word; background-color:#ffffff; font-family:tahoma;">
<!-- page note ************************************************************************************************* -->
'.$lval['pages_note'].'
</div>
</td>
</tr>
</table>
</div>
<!-- div 1 -->
<div style="background:none repeat scroll 0 0 #eeeeee; width:700px; height:auto; border:1px solid green; overflow-x: hidden; overflow-y: auto; margin-top:10px; margin-left:auto; margin-right:auto;">
<table>
<tr>
<td>xxxxxxxxxxx</td>
</tr>
<tr>
<td><table>
<tr>
<td style="width:165 px; background-color:white;"><a name="fb_share" type="icon_link"
share_url="http://topline.me/yad2/product.php?ID='.$lval['pages_id'].'" style="background-color:#5f7ab1; color:white; text-decoration:none; font-size:12px;">مشاركة</a>
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share"
type="text/javascript">
</script></td>
<td style="width:165 px; background-color:white;"><A HREF="javascript:window.print()"><img src="images/print.png" width="32" height="32" border="0" alt=""></A></td>
<td style="width:165 px; background-color:white;"><b style="color:green; font-size:12px;">رقم المنتوج:</b><span style="color:blue;">'.$lval['pages_id'].' </span></td>
</tr>
</table></td>
</tr>
</table>
</div>
</div>';
}
}
//*****************************************GET ALL ADVERTISEMENTS END**************************************
?>
Re: I need some help in php..
That's 600+ lines of mess containing multiple queries, none of which resemble your example in the OP. Could you maybe post just the relevant code?
Re: I need some help in php..
Pls post some relevant code