function _explode_to_int in Shadowbox 5
Same name and namespace in other branches
- 5.2 shadowbox.module \_explode_to_int()
- 6.4 shadowbox.module \_explode_to_int()
- 6 shadowbox.module \_explode_to_int()
- 6.2 shadowbox.module \_explode_to_int()
- 6.3 shadowbox.module \_explode_to_int()
- 7.4 shadowbox.admin.inc \_explode_to_int()
- 7.3 shadowbox.admin.inc \_explode_to_int()
Convert numerical value(s) within a delimited string to integer(s).
Explode a space delimited string e.g. 'a b 2' and cast numeric string values to integers.
Parameters
$string: A space delimited string.
Return value
An array containing strings and integers.
1 call to _explode_to_int()
- shadowbox_get_settings in ./shadowbox.module 
- Construct the JS settings array.
File
- ./shadowbox.module, line 800 
- Shadowbox, a JavaScript media viewer application for displaying content in a modal dialogue.
Code
function _explode_to_int($string) {
  foreach (explode(' ', $string) as $value) {
    $output[] = is_numeric($value) ? (int) $value : $value;
  }
  return $output;
}