Skip to content

find_by_gsm ​

php
array|boolean find_by_gsm ( string $gsm, [boolean $create = false] )

Returns the database email addresses associated with the phone number $gsm. Returns false if no address has that number or if the number is invalid.

Set $create to true to create an address with the specified phone number.

Example:

php
$gsm = "+48123456789";
print("GSM number ".$gsm." is currently assigned to \n");

$email = find_by_gsm($gsm);

if ($email) {
  $len = count($email);
  $len--;
  for ($i = 0 to $len) {
    print($email[$i]."\n");
  }
}

The result may look like this:

GSM number +48123456789 is currently assigned to
test@sare.pl