Below is something I try that ofcourse not work because of rsosort.
Here is my code:
---
$lagret_dato = $_POST['lagret_dato'];
foreach($lagret_dato as $dag){
$dag = explode("/", $dag);
rsort($dag);
$dag = implode("-", $dag);
var_dump($dag);
W
Hello,
try & - reference
foreach($lagret_dato as &$dag) or something like this :-)
Premek.
On Fri, 26 Jul 2013 11:18:03 +0200, Karl-Arne Gjersøyen
wrote:
Below is something I try that ofcourse not work because of rsosort.
Here is my code:
---
$lagret_dato = $_POST['l
2013/7/26 Davi Marcondes Moreira
> Hi! I suggest you to try this:
>
> $foo = DateTime::createFromFormat('d/m/Y');
> $newDate = $foo->format('Y-m-d');
>
Thank you veyr much. With a small modification this work perfec!
Karl
> Em 26/07/2013 09:19, "Karl-Arne Gjersøyen"
> escreveu:
>
> Below i
I think you should change from using 'rsort' ( a SORT function) to
'array_reverse', a simple reverse function.
Your example of what you desire is wrong.
24-7-2013 will give you the 2013-24-7 that you want.
Here is my sample code. Try it yourself.
**";
echo "Try using rsort";
$dagparts =
On 7/26/2013 10:10 AM, Jim Giner wrote:
I think you should change from using 'rsort' ( a SORT function) to
'array_reverse', a simple reverse function.
Your example of what you desire is wrong.
24-7-2013 will give you the 2013-24-7 that you want.
oops.
I meant to say "will NOT give you the 2013-
Use this:
echo preg_replace('#(\d{2})/(\d{2})/(\d{4})#' , "\\3-\\2-\\1", '24/07/2013'
); RESULT => 2013-07-24
Alejandro M.S
-Mensagem original-
De: Jim Giner [mailto:jim.gi...@albanyhandball.com]
Enviada em: sexta-feira, 26 de julho de 2013 11:12
Para: php-general@lists.php.net
Assunto
On Fri, Jul 26, 2013 at 5:18 AM, Karl-Arne Gjersøyen wrote:
> Below is something I try that ofcourse not work because of rsosort.
> Here is my code:
> ---
> $lagret_dato = $_POST['lagret_dato'];
> foreach($lagret_dato as $dag){
>
> $dag = explode("/", $dag);
>
On 13-07-26 11:42 AM, jomali wrote:
On Fri, Jul 26, 2013 at 5:18 AM, Karl-Arne Gjersøyen wrote:
Below is something I try that ofcourse not work because of rsosort.
Here is my code:
---
$lagret_dato = $_POST['lagret_dato'];
foreach($lagret_dato as $dag){
$dag =
On Fri, Jul 26, 2013 at 1:08 PM, Robert Cummings wrote:
> On 13-07-26 11:42 AM, jomali wrote:
>
>> On Fri, Jul 26, 2013 at 5:18 AM, Karl-Arne Gjersøyen > >wrote:
>>
>> Below is something I try that ofcourse not work because of rsosort.
>>> Here is my code:
>>> ---
>>> $lagret_
jomali:
Use this:
echo preg_replace('#(\d{2})/(\d{2})/(\d{4})#' , "\\3-\\2-\\1", '24/07/2013'
); RESULT => 2013-07-24
Alejandro M.S
-Mensagem original-
De: jomali [mailto:jomali3...@gmail.com]
Enviada em: sexta-feira, 26 de julho de 2013 17:38
Para: Robert Cummings
Cc: Karl-Arne Gjersøy
On 13-07-26 04:38 PM, jomali wrote:
On Fri, Jul 26, 2013 at 1:08 PM, Robert Cummings wrote:
On 13-07-26 11:42 AM, jomali wrote:
On Fri, Jul 26, 2013 at 5:18 AM, Karl-Arne Gjersøyen
wrote:
Below is something I try that ofcourse not work because of rsosort.
Here is my code:
--
On 7/26/2013 5:29 PM, Robert Cummings wrote:
On 13-07-26 04:38 PM, jomali wrote:
On Fri, Jul 26, 2013 at 1:08 PM, Robert Cummings
wrote:
On 13-07-26 11:42 AM, jomali wrote:
On Fri, Jul 26, 2013 at 5:18 AM, Karl-Arne Gjersøyen
wrote:
Below is something I try that ofcourse not work becaus
On 13-07-26 05:33 PM, Jim Giner wrote:
On 7/26/2013 5:29 PM, Robert Cummings wrote:
And so it follows, that my solution, thus far, is the only solution
posted that actually meets the requirements. Why you think my solution
does not perform is beyond me since a simple run of the code would
output
On Jul 26, 2013, at 4:18 AM, Karl-Arne Gjersøyen wrote:
> Below is something I try that ofcourse not work because of rsosort.
> Here is my code:
> ---
> $lagret_dato = $_POST['lagret_dato'];
>foreach($lagret_dato as $dag){
>
>$dag = explode("/", $dag);
> rs
augh, apologies; i didn't see all the other replies….
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
15 matches
Mail list logo