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

    Problema con stringa ed Array

    Ho bisogno di un piccolo aiuto:

    Devo trasformare una stringa caricata dinamicamente in un'array.
    Esempio:

    La mia stringa dovrebbe esser così:

    dato1=100&dato2=200&datoN=x

    Avrei bisogno che da questa stringa venisse fuori un'array di questo tipo:
    dato[1] = 100
    dato[2] = 200
    dato[N] = x

    Il problema e che i numeri possono esser variabili possono essere 3 come 40 ....

    Help me plz

  2. #2
    dalla guida di Flash 5:
    codice:
    String.split
    
    Syntax 
    myString.split(delimiter);
    
    Arguments 
    delimiter The character used to delimit the string. 
    
    Description 
    Method; splits a String object by breaking the string wherever 
    the specified delimiter argument occurs, and returns the 
    substrings in an array. If no delimiter is specified, the 
    returned array contains only one element—the string itself. 
    If the delimiter is an empty string, each character in the 
    String object becomes an element in the array.

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.