Jump to content

Modify single item of smarty array...


Recommended Posts

Hi,

 

Here's an example:

 

_tpl_vars: Array
 (
   [clientsstats] => Array
       (
           [numpaidinvoices] => 0
           [paidinvoicesamount] => $0.00 USD
           [numdueinvoices] => 0

 

So I wanted to modify/assign numdueinvoices, I'd use the following:

 

$smarty->assign('clientsstats', array('numdueinvoices' => 123456));

 

Issue with the above is that it will kill the other items of the array. I'd like to know how to modify a single item of said array without destroying the other items. Any ideas truly welcomed.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated