Passing An Id Using An Ajaxbutton

The answer is most likely simple, but I’m still having trouble with it after reading a lot of passing variables using ajax and yii. Hopefully someone can quickly clear up my problem and I’ll learn something new.

I have ajaxButtons that will create and delete all. They work just fine, because they don’t require any record id’s to function. Here is what I have:




public function actionRemoveItem()


		echo $_POST['$item_id'];


For the sake of understanding I would just like to be able to echo the item id I’m trying to pass. Thanks!

How about this:


array('ticket/RemoveItem', 'id' => $item['id'])


public function actionRemoveItem($id)

Thanks, so simple. I don’t know why I kept trying to stick the value on the end.