preg_replace arabic title like مرحبا-اهلاً-بك-هنا

guys i have tried a lot of function but no one of them help me the way that supposed to be.

i have htaccess to replace URL to freindly URL like (test-test-test-test)

in english everything works fine but in arabic not work (مرحبا-مرحبا-مرحبا-مرحبا) not working probably

// English function work fine! replace long title with dashes 
// ex: hello-world-how-is-everything
    function seoUrl($string) {
        $string = strtolower($string);
        $string = str_replace('&',' ',$string);
        $string = preg_replace("/[^a-z0-9_s-]/", "", $string);
        $string = preg_replace("/[s-]+/", " ", $string);
        $string = preg_replace("/[s_]/", "-", $string);
        return $string;
    }

so i want it to be work in arabic language..
thanks

storing positive value in mysql

I’m trying to store something like this in MYSQL table with php : 1+2+3+4

ex: $apple=’1+2+3+4′;

But it only insert the first number “1” in the row apple of my table and drop the rest of the chain

PHP uniqid() – Are there any chances of Duplication

I’m currently using php’s uniqid() since the requirement is not to exceed 15 chars alphanumeric. But I’m worried if there’s any chances of duplication/collision because of more than thousand entries each day.

I can’t use salt since it exceeds 15 chars. Is it okay to just use uniqid() or is there a better solution?

Fetch API giving 403 error in Codeigniter 3

 products.push({'<?php echo $this->security->get_csrf_token_name(); ?>':'<?php echo $this->security->get_csrf_hash(); ?>'});
    fetch(url + 'createProducts' ,{
        method: 'POST',
        credentials: 'same-origin',
        mode: 'same-origin',
        headers: {
        'Accept':       'application/json',
        'Content-Type': 'application/json',

        },
        body: JSON.stringify(products)
    }).then(()=>{alert('done'); console.log(response.json());})
        .catch(()=>{alert('error AJAX')});


in products, I have an array of products for my project
ad I am pushing my csrf token too.

But still getting 403 error, please help me resolve this.

Thank You