Caution: This documentation is for Exponential, from version 3.x to 6.x.
For 5.x documentation covering Platform see Exponential Platform Documentation, for difference between legacy and Platform see 5.x Architecture overview.

Re: How to modify an array element??

Actualy, to have the equivalent to the traditional PHP $myArray[$i]++, I use the following:
{set $counts = $counts|insert($i,inc($counts[$i]))|remove(inc($i))}
Huge, isn't it?
  • Re: Re: How to modify an array element??

    I mean :
    $myArray[$i]++
    {set $myArray = $myArray|insert($i,inc($myArray[$i]))|remove(inc($i))}
    • Re: Re: Re: How to modify an array element??

      {$myArray = $myarray|inc()}

Anonymous User (19/11/2007 12:21 pm)

Anonymous User (19/11/2007 12:21 pm)


Comments

  • Re: Re: How to modify an array element??

    I mean :
    $myArray[$i]++
    {set $myArray = $myArray|insert($i,inc($myArray[$i]))|remove(inc($i))}
    • Re: Re: Re: How to modify an array element??

      {$myArray = $myarray|inc()}