peehaa Posted September 8, 2007 Report Share Posted September 8, 2007 saakshu ar to, ka atvainojos par rakstiitshanu transliitaa. taatad - ja mainiigais $fails ir bilde-001.jpg, tad kaa noteikt kaads ir $fails numurs un izveidot atsevishkju mainiigo, kas satureetu to numuru? Link to comment Share on other sites More sharing options...
martins256 Posted September 8, 2007 Report Share Posted September 8, 2007 substr() neder ? Link to comment Share on other sites More sharing options...
andrisp Posted September 8, 2007 Report Share Posted September 8, 2007 paskaties preg_match. Varētu izmantot /-[0-9]+\./ vai ko tādu. Link to comment Share on other sites More sharing options...
peehaa Posted September 9, 2007 Author Report Share Posted September 9, 2007 paldies, substr() ir tieshi laikaa! :) Link to comment Share on other sites More sharing options...
Val Posted September 9, 2007 Report Share Posted September 9, 2007 kad skaitlis aizies pāri 999, tad būs jāpielabo Link to comment Share on other sites More sharing options...
peehaa Posted September 9, 2007 Author Report Share Posted September 9, 2007 zinu, zinu, bet visas bildes neglabaasies vienaa galerijaa, taakaa nemaz neaizies. :) + velviens jautajums, lai nav jaataisa jauns topiks - ja mapee bildes ir 3 faili: bilde-001.jpg bilde-002.jpg bilde-003.jpg, tad kaa lai nosaka, kura numurs ir vislielaakais? ps. ar php ljoti ilgi neesmu njeemies, nekaa neatceros. :) Link to comment Share on other sites More sharing options...
bubu Posted September 9, 2007 Report Share Posted September 9, 2007 Tur nav ko atcerēties. Tur vajag tikai drusku padomāt. Nolasi visas bildes pēc kārtas (glob vai readdir) un atrodi lielāko skaitli tajās. Link to comment Share on other sites More sharing options...
peehaa Posted September 9, 2007 Author Report Share Posted September 9, 2007 nu jaa, bet nevaru iedomaaties, kas par funkciju to speetu izziileet... o_O Link to comment Share on other sites More sharing options...
bubu Posted September 9, 2007 Report Share Posted September 9, 2007 Kā kas par funkciju? Es tak pateicu - glob vai readdir. Link to comment Share on other sites More sharing options...
andrisp Posted September 9, 2007 Report Share Posted September 9, 2007 Izmanto to pašu substr, lai nolasītu visu bilžu numurus. Samet iekš masīva. Un tad sakārto. Varēsi redzēt, kurš ielākais, kurš mazākais etc. Link to comment Share on other sites More sharing options...
Recommended Posts