Hi, Im new both to php and this forum. Hope you can help me with a problem.
I have the following code, I want to pass $user variable to an object in the following line: "$result = $o_search->search('modified.$user:"2013"'); "
I tried setting $user to global but it doesn't work. I also tried "$o_search = new ObjectSearch($user);"
But no luck either. I think I need to use a constructor, but I can't figure it out how.
The code bellow works, but it doesn't take the value from $user
Any help would be very much appreciated.
Excuse my English, it's not my native language.
$po_request = $this->getVar('request');
$vs_widget_id = $this->getVar('widget_id');
$user = $this->getVar('user');
$o_search = new ObjectSearch();
$result = $o_search->search('modified.$user:"2013"'); //Here the value from $user does not get passed, if i replace $user with $user actual content the code works like it should.
Print "You selected user: $user"."<br/>\n"; //Here the value does get printed
$count = 1;
print "Hit ".$count.": ".$result->get('ca_objects.preferred_labels.name')."<br/>\n";