$categoriesSub = mysql_query("SELECT * FROM categories WHERE categories_parent_id='".$infoCate->categories_id."'");
if(mysql_num_rows($categoriesSub)!=0){
while ($infoCateSub = mysql_fetch_object($categoriesSub)){
if($infoCate->categories_id==$infoCateSub->categories_parent_id){