Skip to content

Instantly share code, notes, and snippets.

@j-tap
Created September 30, 2021 12:52
Show Gist options
  • Save j-tap/4b48cb8efef56933d867b4107484f500 to your computer and use it in GitHub Desktop.
Save j-tap/4b48cb8efef56933d867b4107484f500 to your computer and use it in GitHub Desktop.
<?php
$files = scandir('../app/Models');
$result = [];
foreach ($files as &$s)
{
if (strlen($s) > 2)
{
$name = explode('.', $s);
array_push($result, "'$name[0]'");
}
}
print_r(implode(', ', $result));
exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment