07-03-2008, 04:17 AM
|
#3 (permalink)
|
|
The Contributor
Join Date: Jun 2008
Location: Twin Cities, Minnesota, USA
Posts: 27
Thanks: 2
|
I thought it would be complicated actually.
I found vsrpintf which seems to be exactly what I want.
This is what I came up with,
PHP Code:
public function parsePhrase($szItem, $varArray)
{
$aItem = $this->m_pXML->xpath(sprintf("//phrase[@id='%s']", $szItem));
$szItem = empty($aItem[0]) ? null : (string) $aItem[0];
return vsprintf($szItem, $varArray);
}
I can load up $varArry with whatever I use in the string template.
Thanks for your help.
|
|
|
|