www.webdeveloper.com
Results 1 to 3 of 3

Thread: How to modify/customize this code

Hybrid View

  1. #1
    Join Date
    Mar 2012
    Posts
    3

    How to modify/customize this code

    I have classified site. The below link displays the main categories horizontally at the bottom of the site. I would to accomplish the same thing with name of countries, having the countries name horizontally listed at the footer as well. here's the code below...

    </div>
    <div style="margin:0 15px 0 15px;" class="box-head ac">
    <p class="mt10 bot_link b"><span class="blue-heading">Categories : </span>
    <?php $cat_Arr_fotter=main_cat_array();
    $i=1;
    foreach($cat_Arr_fotter as $keyfoot=>$valfoot){
    $html_link_foot=SITE_WS_PATH."/".GetValidFileName(Rec_display_formate($cat_Arr_fotter[$i]['catName']))."-".$cat_Arr_fotter[$i]['catId'].".htm";
    //SITE_WS_PATH;/classified-listing.php?catId=<?=$cat_Arr_fotter[$i]['catId'];
    ?>
    <a href="<?=$html_link_foot;?>" class="link">
    <?=ucfirst($cat_Arr_fotter[$i]['catName']);?></a> |
    <? $i++; } ?></p>

    please help!!!

  2. #2
    Join Date
    Nov 2002
    Posts
    2,632
    Quote Originally Posted by admise78 View Post
    I have classified site. The below link displays the main categories horizontally at the bottom of the site. I would to accomplish the same thing with name of countries, having the countries name horizontally listed at the footer as well. here's the code below...

    please help!!!
    Code:
    <div style="margin:0 15px 0 15px;" class="box-head ac">
    You shouldn't have multiple classes and instyles within the same tag. You might as well give it a proper name and go from there.

    Code:
    <div id="mainCat">
    Code:
    <p class="mt10 bot_link b">
    Don't use what looks like gibberish names. I would axe the class and simply define the CSS this way

    Code:
    #mainCat p {
        CSS goes here....
    }
    Code:
    <span class="blue-heading">Categories : </span>
    Since I get the impression this is a header, treat it as so.

    Code:
    <h3>Categories : </h3>
    Code:
    h3 {
        display:inline;
        Other CSS....
    }
    Code:
    <?php $cat_Arr_fotter=main_cat_array();
    I assume you mean #cat_Arr_footer. You need to create a function for the countries. Sub in the array $country_array.

    Code:
    foreach($cat_Arr_fotter as $keyfoot=>$valfoot){
    Sub in the array $country_array.

    Code:
    $html_link_foot=SITE_WS_PATH."/".GetValidFileName(Rec_display_formate($cat_Arr_fotter[$i]['catName']))."-".$cat_Arr_fotter[$i]['catId'].".htm";
    While this is a mess, it should be easy to sub in county versions of the cat stuff.

    Code:
    ?> 
    <a href="<?=$html_link_foot;?>" class="link">
        <?=ucfirst($cat_Arr_fotter[$i]'catName']);?>
    </a>
    | <? $i++; } ?>
        </p>
    Again, it should be easy to sub in the country info. Note, you missed starting the PHP code with "<?php."

  3. #3
    Join Date
    Mar 2012
    Posts
    3

    Thank you

    thank you for your quick reply. your input are well appreciated. as you can i am new with php...I can make changes in files, but not savvy.

    I notice this code in the classified search where people can make country selection.
    <?=get_state($classi_state);?>

    How do you create a function for the countries to Sub in the array $country_array.


    thank you!!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles