View Single Post
Old 07-03-2008, 04:17 AM   #3 (permalink)
ryanmr
The Contributor
 
ryanmr's Avatar
 
Join Date: Jun 2008
Location: Twin Cities, Minnesota, USA
Posts: 27
Thanks: 2
ryanmr is on a distinguished road
Default

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.
ryanmr is offline  
Reply With Quote