Hi all..

I am not sure if I am doing this correct, but I am trying to return a
private function from my app_controller.php to posts_controller.php

App_controller.php

function __utfConvertChar($tempurl) {
                $j = mb_strlen($tempurl);
                for ($k = 0; $k < mb_strlen($tempurl); $k++) {
                $char = mb_substr($tempurl, $k, 1);
                                if($this->__utfCharToNumber($char) == '195184' 
|| $this-
>__utfCharToNumber($char) == '195152')
                                {
                                $newurl = str_replace($char,'o',$tempurl);
                                }
                                if($this->__utfCharToNumber($char) == '195165' 
|| $this-
>__utfCharToNumber($char) == '195133' || $this-
>__utfCharToNumber($char) == '195164' || $this-
>__utfCharToNumber($char) == '195132')
                                {
                                $newurl = str_replace($char,'aa',$tempurl);
                                }
                                if($this->__utfCharToNumber($char) == '195188' 
|| $this-
>__utfCharToNumber($char) == '195156')
                                {
                                $newurl = str_replace($char,'u',$tempurl);
                                }
                }
                return $newurl;
        }
        function __utfCharToNumber($char) {
                $i = 0;
                $number = '';
                while (isset($char{$i})) {
                $number.= ord($char{$i});
                ++$i;
                }
                return $number;
        }

Post_controller.php
$this->__utfConvertChar($tempurl);


Am I doing something wrong here? I can not see what.. Please assist
me, and/or let me know that this is not the best practice to do this.

Thanks all for any help!!!!
Regards!
-Tom


I am unable to retrieve the $newurl to my posts_controller.php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to