serdominik

serdominik

Joined
Oct 04, 2010

Activity Stream

serdominik commented on a Page, Building a Parent/Child Category Structure  -  Oct 05, 2010

I'm sorry but this morning a fresh mind I found the solution!

here's the code:

<?php
$categorie=array();

$x=0;
foreach($cat_list as $cat => $value) {
foreach($value as $c => $v) {
$categorie[$x][$c]=$v;
}
$x++;
}
?>
and then a simple loop to the last array

thanks for this code wonderufl

 Respond  
serdominik commented on a Page, Building a Parent/Child Category Structure  -  Oct 05, 2010

I know you!
but I need to use the array like this: $cat_list[$x]['cat_title'] or $cat_list[$x]['cat_id'] for a cycle to be applied to select html option or screen printing.
I tried the solution of a double foreach, but I can not apply this example:$cat_list[$x]['cat_title'] or $cat_list[$x]['cat_id'].
can you please post a valid method? I'm really in trouble!
thanks for your time

 Respond  
serdominik commented on a Page, Building a Parent/Child Category Structure  -  Oct 04, 2010

how can I print my values?
an alternative to print_r?

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.