Jump to content

PHP doubt


Menrmenrmen

Recommended Posts

$alllist = new StdClass;

for each ( .... )
{
$alllist->link = $link;
$alllist->title = $title;
$alllist->imgurl = $imgURL;
$alllist->price = $price;
$alllist->mname = $merchantname;
$alllist->description = $description;

$all[] = $alllist;
}

$alllist clear avatledhu anukunta, $all[] lo values display chesthe repetetion vasthunnayi...

$alllist clear ela cheyyali ?

Link to comment
Share on other sites

12 hours ago, Menrmenrmen said:

$alllist = new StdClass;

for each ( .... )
{
$alllist->link = $link;
$alllist->title = $title;
$alllist->imgurl = $imgURL;
$alllist->price = $price;
$alllist->mname = $merchantname;
$alllist->description = $description;

$all[] = $alllist;
}

$alllist clear avatledhu anukunta, $all[] lo values display chesthe repetetion vasthunnayi...

$alllist clear ela cheyyali ?

You can do unset($alllist); after the foreach.

Link to comment
Share on other sites

6 hours ago, charmingc said:

You can do unset($alllist); after the foreach.

 

17 hours ago, chor said:

y stdclass to alllist?

code change chesa... stdclass endhuku ani... array

$alllist = array();

$alllist = array("link"=>$link, "title"=>$title, "imgurl"=>$imgURL, "price"=>$price, "mname"=>$merchantname, "description"=>$description);

$all[] = $alllist;

uppudu loop chesi echo ela cheyyali ?

foreach ($all as $each)
{
echo $each->link;
}

emi display avatle

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...