Ver Mensaje Individual
  #5 (permalink)  
Antiguo 01/10/2013, 06:29
Avatar de guardarmicorreo
guardarmicorreo
 
Fecha de Ingreso: noviembre-2012
Ubicación: Córdoba
Mensajes: 1.153
Antigüedad: 11 años, 5 meses
Puntos: 84
Respuesta: Problema al sustituir subcadena/tag por otra cadena

Cita:
Iniciado por SkAr88 Ver Mensaje
Haz hecho var_dump de la ultima variable de session?
Sí y no sustituye las tags.

El var_dump( $_SESSION['randomresult']['questions'] );

Devuelve lo siguiente

Código PHP:
Ver original
  1. array(5) {
  2.   [0]=>
  3.   array(6) {
  4.     [0]=>
  5.     string(2) "13"
  6.     ["id_question"]=>
  7.     string(2) "13"
  8.     [1]=>
  9.     string(46) "¿[nombre] 111?"
  10.     ["question"]=>
  11.     string(46) "¿[nombre] 111?"
  12.     [2]=>
  13.     string(2) "18"
  14.     ["id_typequestions"]=>
  15.     string(2) "18"
  16.   }
  17.   [1]=>
  18.   array(6) {
  19.     [0]=>
  20.     string(2) "21"
  21.     ["id_question"]=>
  22.     string(2) "21"
  23.     [1]=>
  24.     string(18) "[nombre]55"
  25.     ["question"]=>
  26.     string(18) "[nombre]55"
  27.     [2]=>
  28.     string(2) "18"
  29.     ["id_typequestions"]=>
  30.     string(2) "18"
  31.   }
  32.   [2]=>
  33.   array(6) {
  34.     [0]=>
  35.     string(2) "13"
  36.     ["id_question"]=>
  37.     string(2) "13"
  38.     [1]=>
  39.     string(46) "¿[nombre] 1234?"
  40.     ["question"]=>
  41.     string(46) "¿[nombre] 1234?"
  42.     [2]=>
  43.     string(2) "18"
  44.     ["id_typequestions"]=>
  45.     string(2) "18"
  46.   }
  47.   [3]=>
  48.   array(6) {
  49.     [0]=>
  50.     string(2) "16"
  51.     ["id_question"]=>
  52.     string(2) "16"
  53.     [1]=>
  54.     string(63) "¿11[nombre] 22?"
  55.     ["question"]=>
  56.     string(63) "¿11 [nombre] 22?"
  57.     [2]=>
  58.     string(2) "20"
  59.     ["id_typequestions"]=>
  60.     string(2) "20"
  61.   }
  62.   [4]=>
  63.   array(6) {
  64.     [0]=>
  65.     string(2) "19"
  66.     ["id_question"]=>
  67.     string(2) "19"
  68.     [1]=>
  69.     string(16) "3333333333333333"
  70.     ["question"]=>
  71.     string(16) "3333333333333333"
  72.     [2]=>
  73.     string(2) "19"
  74.     ["id_typequestions"]=>
  75.     string(2) "19"
  76.   }
  77. }

Donde dice [nombre] tendría que haber sustituido por el @screen_name, pero ni caso :S
__________________
Ayúdame a hacerlo por mi mismo.