Skip to content

Instantly share code, notes, and snippets.

View shayanpasokhi's full-sized avatar

Shayan Mohammad Pasokhi Razavi shayanpasokhi

  • Tehran, Iran
View GitHub Profile
@amirmojiry
amirmojiry / Convert like-Persian characters to Persian characters
Last active September 29, 2024 11:06
A PHP function for convert like-Persian characters to Persian characters
<?php
function convert_non_persian_chars_to_persian ($str) {
//main goal: arabic chars: from ؀ U+0600 (&#1536;) to ۿ U+06FF (&#1791;)
//source: https://unicode-table.com/en
$right_chars = array (
'ا',
'ب',
'پ',
'ت',
'ث',