recherche

Maison  >  Questions et réponses  >  le corps du texte

Aidez-moi à voir comment la récursivité reçoit la valeur de retour

//Filtrer les balises HTML

function formatString($str){

$preg = "/</?[^>]+>/i";


//Déterminer s'il s'agit d'un array

if(!is_array($str)){

                                                                        ' s through ' s ‐  ‐ ‐ ‐ return preg_replace($preg,'',$str); / /Déterminer si $ v est un tableau multidimensionnel

if (is_array ($ v)) $ Str [$ k] [$ v] = FormatString ($ v)

else {$ Str [$ k] [$ v] = preg_replace($preg,'', $v);}

                                                                                                                            

}

逢丿场逢丿场2737 Il y a quelques jours763

répondre à tous(1)je répondrai

  • 逢丿场

    逢丿场2017-08-16 17:22:15

    Résolu

    //Filtrer les balises HTML

    function formatString($str){

    $preg = "/</?[^>]+>/i";

    $tree = array() ;判 // Déterminez s'il s'agit d'un tableau comme $k=> } else if (! is_array ($ v)) {

    $ tree [$ k] = preg_replace ($ preg, '', $ v); }

    répondre
    0
  • Annulerrépondre