being new to php i am not ble to figure out how to use if else inside php array. i tried to do something like this
function column_title($item){
$status=false;
if($item->uTestimonials_approval =='0')
$status=false;
else
$status=true;
//Build row actions
$actions = array(
$status ? 'unapprove' => sprintf('<a href="?page=%s&action=%s&id=%s">Unapprove</a>',$_REQUEST['page'],'unapprove',$item-> uTestimonials_id),:
'approve1' => sprintf('<a href="?page=%s&action=%s&id=%s">Approve</a>',$_REQUEST['page'],'approve',$item-> uTestimonials_id),
'delete' => sprintf('<a href="?page=%s&action=%s&id=%s">Delete</a>',$_REQUEST['page'],'delete',$item-> uTestimonials_id),
);
//Return the title contents
return sprintf('%1$s <span style="color:silver">(id:%2$s)</span>%3$s',
/*$1%s*/ $item-> uTestimonials_message,
/*$2%s*/ $item-> uTestimonials_id,
/*$3%s*/ $this->row_actions($actions)
);
}
but i am getting following parsing exception
Parse error: syntax error, unexpected T_DOUBLE_ARROW
can any one help me to find what exactly i am doing wrong thanks in advance
I am perfectly fine for negative voting but its always better to specify why some one did that so that person can improve him/herself