Updated Articles

  1. sgapiTrim(%%string)

    This is equivalent to the trim function in PHP. This will remove all trailing and preceding whitespace. sgapiChop and sgapiTrim are helpful for anytime you need to pull or display variables with no spaces before or after them. For example, le...
  2. sgapiPregSplit(%%pattern, %%subject, %%limit, %%flags)

    This is equivalent to the preg_split function in PHP. It allows you to split the given string by a regular expression. To see an example or learn more other PHP functions and PHP programming, visit PHP Documentation . ...
  3. sgapiChop(%%string)

    This is equivalent to the chop function in PHP. This will remove the trailing whitespace. Example The below example will output the following: Text to Left all this whitespaceText to Right. %% string = ' all this whitespace ...
  4. sgapiIsArray(%%string)

    This is equivalent to the is_array function in PHP. Evaluates as "true" if the variable is an array. To see an example or learn more other PHP functions and PHP programming visit PHP Documentation . ...
  5. sgapiArray_Diff(%%array1,%%array2)

    This is the equivalent to the array_diff function in PHP. Given two arrays this function will compare %%array2 against %%array1 and return an array of values that are present in %%array1 but not present in %%array2. To see an example or lea...
  6. sgapiRound(%%number,%%decimal)

    This is equivalent to the round function in PHP. Returns the %%number rounded to the nearest whole number by default. If the optional %%decimal is also included, it defines the number of decimal positions to include. To see an example or ...
  7. sgapiPow(%%base,%%power)

    This is equivalent to the pow function in PHP. It returns the value of %%base raised to the power of %%power. To see an example or learn more other PHP functions and PHP programming, visit PHP Documentation . ...
  8. sgapiPreg_Replace(%%pattern, %%replacement, %%subject, %%limit)

    This is equivalent to the preg_replace function in PHP. Searches %%subject for matches to %%pattern and replaces them with %%replacement. The optional %%limit parameter defaults to -1 (no limit). To see an example or learn more other PHP ...
  9. sgapiBase64Encode(%%data)

    This is equivalent to the base64_encode function in PHP. It encodes %%data with base64. To see an example or learn more other PHP functions and PHP programming, visit PHP Documentation . ...
  10. sgapiFullChop(%%string)

    This function runs both the PHP rtrim and ltrim functions on the given value and returns the results. This will remove all preceding and trailing whitespace. Example The below example will output the following: Text to Leftall this ...