Ver Mensaje Individual
  #3 (permalink)  
Antiguo 16/12/2011, 03:10
Avatar de williamhpf
williamhpf
 
Fecha de Ingreso: mayo-2009
Mensajes: 144
Antigüedad: 15 años
Puntos: 8
Respuesta: Reemplazar espacios en blanco en xml creado con php

Cita:
Iniciado por Arkaitz Ver Mensaje
Por ejemplo:

Código PHP:
Ver original
  1. <?
  2. $hello = 'Hello World';
  3. $su = str_replace (' ','-', $hello);
  4. echo $su;
  5. ?>


Seria algo asi?


codigo php
conexion
llamada bd
$lo-que-sea;
$otra-cosa;
$extraido-de-bd;

$hello = '$extraido-de-bd';
$su = str_replace (' ','-', $hello);
$su;
$sigo;
genero la url

echo'<url>http://www.ejemplo.com/'.$su.'.html</url>;

cierro el php