PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
$objProd->m_objCat = new clsCategory(); //m_objCat defined in clsProducts
$objProd->m_objCat->m_intCatId = $_REQUEST['catid'];
$objCat->m_intCatId=$_REQUEST['catid'];
$strTitleCatName = $objCat->GetCatName();
$objProd->m_objCat = new clsCategory(); //m_objCat defined in clsProducts
$objProd->m_objCat->m_intCatId = $_REQUEST['catid'];
$objCat->m_intCatId=$_REQUEST['catid'];
$strTitleCatName = $objCat->GetCatName();
The first three aligns are assignments...
The first one assigns a new instance of clsCategory to $objProd->m_objCat..
The second assigns the value of $_REQUEST['catid'] to $objProd->m_objCat->m_intCatId...
Perhaps this double indirection confuses you... The following code does the same: