Możesz ustawić np. tzw. flagę na false.
$flag = true;
}
if(true){
if($flag==true){
// $mysqli->query( ...........
$flag = false;
}
}
Kod przepisany na asm x86, nie wiem, czy poprawnie, ale spróbowałem:
Kod
global _main
extern _printf
SECTION .data
msg: db "%d",0
msg2: db "Hello",0
var: dd 0
var2: dd 0
SECTION .text
_main:
mov eax,-1 ; eax=-1
mov ebx,1 ; ebx=1
; it is, as if this !isset, I accepted, that if is -1, it not exist
cmp eax,-1 ; to jest tak jakby ten !isset, przyjąłem, że gdy jest na -1, to nie istnieje
je jumping ; if(eax==-1) jump to jumping else
mov eax,0 ; $flag=false
ret ; exit?
jumping:
mov eax,1 ; $flag=true
cmp ebx,1 ; if(ebx==1) jump to jumping2
je jumping2
jumping2:
cmp eax,1 ; if(eax==1) jump to jumping3
je jumping3
jumping3:
mov eax,0 ; eax=0
;your code here
push eax ; value from eax put on the stack
push msg2 ; parameter from msg2 put on the stack
call _printf ; call function from library probably C
add esp,8 ; remove (clear) 8 bytes?
ret ; return?
SECTION .bss