Jackal Posted October 14, 2006 Report Share Posted October 14, 2006 $menesis= str_replace("11", "Novembris", $menesis); Kāpēc str_replace vienpadsmit paņem kā viens un viens? Kā uztaisīt, lai paņem vienpadsmit? Link to comment Share on other sites More sharing options...
andrisp Posted October 14, 2006 Report Share Posted October 14, 2006 Pag, kāda atšķirība starp diviem blakus novietot vieniniekiem un vienpadsmit ? Ahh, tev laikam $menesis ir integer ? Pārveido to $menesis par string pirms veic aizvietošanu. Link to comment Share on other sites More sharing options...
Klez Posted October 14, 2006 Report Share Posted October 14, 2006 datumam tachu ir date funkcija ... paskati manuaalii parametrus ... Link to comment Share on other sites More sharing options...
andrisp Posted October 14, 2006 Report Share Posted October 14, 2006 Klez, tas ko viņš grib, manuprāt, nav izdarāms ar date fju. Link to comment Share on other sites More sharing options...
IM24LV Posted October 15, 2006 Report Share Posted October 15, 2006 Nav, datoram tak ir tikai angļu valoda :P Link to comment Share on other sites More sharing options...
andrisp Posted October 15, 2006 Report Share Posted October 15, 2006 (edited) Vispār es ieteiktu nevis ar str_replaciem strādāt, bet gan izveidot array: $m = array ( 1 => 'Janvāris', 2 => 'Februāris', 3 => 'Marts', ..... ) Un pēc tam: $menesis = $m[11]; Edited October 15, 2006 by andrisp Link to comment Share on other sites More sharing options...
blackhalt Posted October 16, 2006 Report Share Posted October 16, 2006 Kāds ir $menesis pilnais formāts? Tas ir kās ir $menesis pirms tā: $menesis= str_replace('11','Novembris',$menesis); Link to comment Share on other sites More sharing options...
Recommended Posts