<?php
$name = "IPC_IPCamera_13_7_24_9_57_45.jpg";
$newName = "";
$parts = explode("_", $name);
for ($i = 0; $i < count($parts); $i++) {
$part = $parts[$i];
if (strlen($part) == 1) {
$part = "0" . $part . "_";
}
$newName .= $part;
}
echo $name . "\n";
echo $newName;
- Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
- IPC_IPCamera_13_7_24_9_57_45.jpg
IPCIPCamera1307_2409_5745.jpg
preferences:
263.67 ms | 406 KiB | 460 Q