Visualizzazione dei risultati da 1 a 5 su 5
  1. #1

    gestire stringa con apici in tag html

    Salve ragazzi..avrei in problema
    .. ho una stringa

    $stringa = "Oggi e'\ Mercoledi\' e sono alle prese con \"Le Stringhe\"";

    ora mettiamo il caso che abbia un href e dovrei passare quella stringa come valore..

    ">CLICCA

    cosa succede..che il titolo mi viene tagliato al primo apice che incontra..anche se ho messo la barra prima...come ovvio a questo inconveniente?
    [ SimplyMepis 8 ]Copyleft
    www.mepisitalia.org IL SITO ITALIANO UFFICIALE DI MEPIS
    www.salentomovida.it LA MOVIDA DEL SALENTO HA UN NUOVO PUNTO D'INCONTRO SUL WEB
    [ SUD SOUND SYSTEM MINA FUECU INTRA ALLU SALENTU ]

  2. #2
    Utente di HTML.it L'avatar di gianiaz
    Registrato dal
    May 2001
    Messaggi
    8,027
    <a href="#" title="<?php echo htmlentities($stringa, ENT_QUOTES); ?>">

    ciao

  3. #3
    funzione sia per i singoli che per i doppi?!
    la provo subito..grazie mille
    [ SimplyMepis 8 ]Copyleft
    www.mepisitalia.org IL SITO ITALIANO UFFICIALE DI MEPIS
    www.salentomovida.it LA MOVIDA DEL SALENTO HA UN NUOVO PUNTO D'INCONTRO SUL WEB
    [ SUD SOUND SYSTEM MINA FUECU INTRA ALLU SALENTU ]

  4. #4
    si ok..funziona..anche se mi mostra le barre...
    [ SimplyMepis 8 ]Copyleft
    www.mepisitalia.org IL SITO ITALIANO UFFICIALE DI MEPIS
    www.salentomovida.it LA MOVIDA DEL SALENTO HA UN NUOVO PUNTO D'INCONTRO SUL WEB
    [ SUD SOUND SYSTEM MINA FUECU INTRA ALLU SALENTU ]

  5. #5
    Utente di HTML.it L'avatar di gianiaz
    Registrato dal
    May 2001
    Messaggi
    8,027
    Originariamente inviato da alex86
    si ok..funziona..anche se mi mostra le barre...
    infatti adesso le barre le devi togliere

    usa stripslashes()

    ciao

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.