afisarea primelor n caractere a unei variabile

Ai o întrebare legată de PHP? Incercăm să îi găsim soluţie. Sau poate doar vrei să publici un cod interesant.

Moderatori: Zamolxe, Moderatori


Avatar utilizator
rair
Junior Member
Mesaje: 34
Membru din: Vin Noi 30, 2007 10:13 pm

Mesajde rair » Mar Dec 25, 2007 6:04 pm

pai nu ai zis ce vrei... :?: :!:

Clax
Junior Member
Mesaje: 45
Membru din: Joi Mai 24, 2007 9:04 pm

Mesajde Clax » Mar Dec 25, 2007 6:07 pm

cum sa afisez primele 10 caractere ale unei variabile
spre exemplu variabila $x = 'abcdefghij';
ce functie sa-i dau la variabila
$x = functie($x);
ca sa ramana doar 'abc' primele 3 caractere

whooper
Senior Member
Mesaje: 866
Membru din: Mar Apr 05, 2005 9:58 pm
Localitate: Toronto ON

Mesajde whooper » Mar Dec 25, 2007 6:50 pm

Join The Forums - Time Well Wasted!

Avatar utilizator
tachyean
Junior Member
Mesaje: 40
Membru din: Sâm Oct 27, 2007 1:35 am
Localitate: constanta
Contact:

Mesajde tachyean » Mie Dec 26, 2007 1:33 pm

substr('abcdefghijklmn', 0, 10);

Avatar utilizator
Quber
Senior Member
Mesaje: 874
Membru din: Mar Iun 27, 2006 8:33 pm
Localitate: localhost
Contact:

Mesajde Quber » Mie Dec 26, 2007 7:56 pm

@tachyean, mai sus e tot raspunsu acesta pus de @whooper, la ce naiba ai mai dat o data raspunsu acesta... mai spun shi eu daca nu intelegea ceva...!
A man who dares to waste one hour of time has not discovered the value of life.

Avatar utilizator
mihaitha
Senior Member
Mesaje: 2383
Membru din: Vin Mai 04, 2007 12:40 pm
Localitate: Sibiu
Contact:

Mesajde mihaitha » Joi Dec 27, 2007 12:59 pm


Avatar utilizator
Quber
Senior Member
Mesaje: 874
Membru din: Mar Iun 27, 2006 8:33 pm
Localitate: localhost
Contact:

Mesajde Quber » Joi Dec 27, 2007 3:45 pm

@mihaitha, nu sunt Moderator dar numi place cind posteaza de 100 ori acelashi post..!
A man who dares to waste one hour of time has not discovered the value of life.


Înapoi la “Cod PHP”

Cine este conectat

Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 8 vizitatori