Remove Leading Zero PHP
User $openingdate=explode(':',$day['opening_time']) remove leading 0 if any Assistant You can remove the leading zero from the extracted hour like this: $openingdate = explode(':', $day['opening_time']); $openingdate[0] = ltrim($openingdate[0], '0'); // Remove leading zero print_r($openingdate); ### Explanation: – `explode(':', $day['opening_time'])` splits the time string into an array. – `ltrim($openingdate[0], '0')` removes any leading zero from the hour […]