• hi everyone,
    could you help me please ?

    i want to dynamise this static part of code php :

    if (
    $une_categoriedupost->name == conCTM ||
    $une_categoriedupost->name == conCTV ||
    $une_categoriedupost->name == conCAR ||
    $une_categoriedupost->name == conCSL
    )

    i’ve got :

    foreach ((get_categories(‘child_of=87’)) as $categorie_fille)
    {
    echo ‘[fille de category 87=’.$categorie_fille->cat_name. ‘]
    ‘;
    }
    this return :

    [fille de category 87=conCAR]
    [fille de category 87=conCSL]
    [fille de category 87=conCTM]
    [fille de category 87=conCTV]

    i test this but it don’t work, somthing is wrong ????

    $toto = array (“
    foreach ((get_categories(‘child_of=87’)) as $categorie_fille)
    {
    $toto .= $categorie_fille->cat_name;
    }
    “);

    someone have an idea ?

  • The topic ‘an array of get_the_category() ???????’ is closed to new replies.