Update custom_function.php

code optimizing, replacing a for loop by array_walk.
Merge pull request #11 from anasAsh/patch-1

Update custom_function.php