Skip to content

Instantly share code, notes, and snippets.

@fatkulnurk
Created February 18, 2019 04:43
Show Gist options
  • Save fatkulnurk/9c4ee85d1e8f4575b2982f2bbdc9cc4d to your computer and use it in GitHub Desktop.
Save fatkulnurk/9c4ee85d1e8f4575b2982f2bbdc9cc4d to your computer and use it in GitHub Desktop.
Parsing NIM
<?php
$data = "[15042353453,845322424242]";
$pattern = '/[^a-zA-Z0-9,]/';
$replacement = '';
$dataResult = preg_replace($pattern, $replacement, $data);
$dataResult = explode(',', $dataResult);
if(substr($dataResult[0],0,3) == 150)
{
echo "<hr>hahahha<hr>";
}
print_r($dataResult);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment