Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Tworzenie warunku w jednej lini przy pomocy petli
rad11
post
Post #1





Grupa: Zarejestrowani
Postów: 1 270
Pomógł: 184
Dołączył: 7.10.2012
Skąd: Warszawa

Ostrzeżenie: (0%)
-----


Mając taka talice:

  1. array(5) {
  2. [0]=>
  3. array(3) {
  4. ["where"]=>
  5. string(7) "a_price"
  6. ["condition"]=>
  7. string(2) ">="
  8. ["match"]=>
  9. int(123213)
  10. }
  11. [1]=>
  12. array(3) {
  13. ["where"]=>
  14. string(7) "a_price"
  15. ["condition"]=>
  16. string(2) "<="
  17. ["match"]=>
  18. int(123)
  19. }
  20. [2]=>
  21. array(3) {
  22. ["where"]=>
  23. string(7) "a_price"
  24. ["condition"]=>
  25. string(1) ">"
  26. ["match"]=>
  27. int(5466)
  28. }
  29. [3]=>
  30. array(3) {
  31. ["where"]=>
  32. string(7) "a_price"
  33. ["condition"]=>
  34. string(1) "="
  35. ["match"]=>
  36. int(87697)
  37. }
  38. [4]=>
  39. array(3) {
  40. ["where"]=>
  41. string(7) "a_price"
  42. ["condition"]=>
  43. string(1) "<"
  44. ["match"]=>
  45. int(14134)
  46. }
  47. }
  48.  


Czy jest mozliwe utworzenie przy uzyciu pętli z tej tablicy warunku w jednej linit tzn:
  1. if(a_price < 14134 && a_price == 87697 && a_price > 5466 && a_price <= 123 && a_price >= 123213){
  2.  
  3. }


Ten post edytował rad11 4.12.2015, 08:07:48
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 25.08.2025 - 04:50