Jump to content

Search the Community

Showing results for tags 'syntax'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (Dreamweaver, Zend, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 3 results

  1. $ARR[$i] == $NEEDLE ? $Count++ : $Count I am using it in: private function _countIf($ARR, $NEEDLE){ $Count = 0; for($i = 0; $i < count($ARR); i++){ $ARR[$i] == $NEEDLE ? $Count++ : $Count } return $Count; }
  2. ok... I'm still struggling with PHP syntax, my editor's linting keeps flagging a line as incorrect. it's supposed to read as " when d1 minus 1 is less than or equal to d2 with d2 being less than or equal to d1 plus 1" so in other words its supposed to be true if d2 is between d1 minus 1 and d1 plus 1, inclusive. I don't want d2 being the previous number, the same number or the next number relative to d1. The same goes for d3, d4, and d5 (4 and 5 are un coded because why code in errors). That being said... This isn't exactly my correct goal but I'm not sure how to code what I really want... Rules a 3 - 5 digit combo (0 - 99 per digit) where: 1. the numbers are not in order. (1,2,3,4 or 55,56,57,58,59 or 4,3,2,1 or 59,58,57,56,55) 2. no more than 2 numbers in the combo may be the same. (45,12,67,12,78 is ok 17,35,17,24,17 is not) 3. repeat numbers may not occur next to each other (45,12,67,12,78 = valid 45,67,12,12,78 = invalid) I can't seem to find a good way to test this without the commands I know from other languages like CountIf, Iffn and RandSamp. (those are Ti-Basic commands) I know "please do it for me" is frowned upon, and hate saying it (I'd rather learn to do it myself), but if anyone can explain how to do this I'd really appreciate it.
  3. I am using this API https://github.com/blocktrail/blocktrail-sdk-php. I am suppose to add this to top of my directory where I want to initialize the API. require 'vendor/autoload.php'; use Blocktrail\SDK\BlocktrailSDK; But the second line gives me an error. use Blocktrail\SDK\BlocktrailSDK; Parse error: syntax error, unexpected 'use' (T_USE) in C:\xampp\htdocs\site\templates\header.php on line 12 Is the "use" a correct syntax for php? Why is it giving me an error?
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.