{"id":50580233,"url":"https://github.com/codewithmark/php-data-parsing-functions","last_synced_at":"2026-06-05T01:03:08.132Z","repository":{"id":299008767,"uuid":"92526606","full_name":"codewithmark/php-data-parsing-functions","owner":"codewithmark","description":null,"archived":false,"fork":false,"pushed_at":"2017-05-26T17:01:22.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-14T05:33:27.411Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codewithmark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-05-26T15:56:13.000Z","updated_at":"2017-05-26T16:14:00.000Z","dependencies_parsed_at":"2025-06-14T05:43:33.879Z","dependency_job_id":null,"html_url":"https://github.com/codewithmark/php-data-parsing-functions","commit_stats":null,"previous_names":["codewithmark/php-data-parsing-functions"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codewithmark/php-data-parsing-functions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithmark%2Fphp-data-parsing-functions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithmark%2Fphp-data-parsing-functions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithmark%2Fphp-data-parsing-functions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithmark%2Fphp-data-parsing-functions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codewithmark","download_url":"https://codeload.github.com/codewithmark/php-data-parsing-functions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithmark%2Fphp-data-parsing-functions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33926275,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-05T01:03:07.290Z","updated_at":"2026-06-05T01:03:08.117Z","avatar_url":"https://github.com/codewithmark.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Data Parsing Functions\n\nYou can use the below functions for parsing your php data\n\n## Size\n\n\u003cbr\u003e\n\u003cp\u003eGet the length of an array or string \u003c/p\u003e\n\n**Size of a string**\n\u003cpre\u003e\n\n$d1 = size('codewithmark');\n\necho \"size of : codewithmark \u003e \" . $d1;\n//out put\nsize of : codewithmark \u003e 12\n\necho \"size of : 123 \u003e \" . size(123);\n//out put\nsize of : 123 \u003e 3\n\n\u003c/pre\u003e\n\n  \n**Size of an array**\n\u003cbr\u003e\nThis will count the total number of objects in an array\n\u003cpre\u003e\n$a1 = array('term_id' =\u003e 5, 'taxonomy' =\u003e 'category', 'count' =\u003e 3);\n \necho \"size \u003e \" .size( $a1);\n\n//out put\nsize \u003e 3\n\u003c/pre\u003e\n\u003cp\u003eThis will be useful to determine if your result query has any records or not\u003c/p\u003e\n  \n## Find\nFrom a list of array find an array with particular object\n  \u003cpre\u003e\n  //data array\n  $a1 = \n  Array(\n      Array\n    (\n      'term_taxonomy_id' =\u003e 5,\n      'term_id' =\u003e 5,\n      'taxonomy' =\u003e 'tumblog',\n      'description' =\u003e '',\n      'parent' =\u003e 0,\n      'count' =\u003e 0,\n    ),\n    Array\n    (\n      'term_taxonomy_id' =\u003e 1,\n      'term_id' =\u003e 1,\n      'taxonomy' =\u003e 'category',\n      'description' =\u003e '',\n      'parent' =\u003e 0,\n      'count' =\u003e 2, \n    ),\n\n    Array\n    (\n      'term_taxonomy_id' =\u003e 3,\n      'term_id' =\u003e 3,\n      'taxonomy' =\u003e 'category',\n      'description' =\u003e '',\n      'parent' =\u003e 0,\n      'count' =\u003e 0,  \n    ),\n\n    Array\n    (\n      'term_taxonomy_id' =\u003e 4,\n      'term_id' =\u003e 4,\n      'taxonomy' =\u003e 'category',\n      'description' =\u003e '',\n      'parent' =\u003e 0,\n      'count' =\u003e 2,   \n    ),\n\n    Array\n    (\n      'term_taxonomy_id' =\u003e 2,\n      'term_id' =\u003e 2,\n      'taxonomy' =\u003e 'nav_menu',\n      'description' =\u003e '',\n      'parent' =\u003e 0,\n      'count' =\u003e 3,    \n    )\n  );\n  \n  $d3 = find ($a1, array('term_id' =\u003e 5));\n  \n  print_r($d3);\n  \n  //out put\n  (\n      [0] =\u003e Array\n          (\n              [term_taxonomy_id] =\u003e 5\n              [term_id] =\u003e 5\n              [taxonomy] =\u003e tumblog\n              [description] =\u003e \n              [parent] =\u003e 0\n              [count] =\u003e 0\n          )\n\n  )\n  \u003c/pre\u003e\n  \n Search for  multiple differert objects\n\u003cpre\u003e\n  $f1 =  array('term_id' =\u003e 5, 'taxonomy' =\u003e 'category', 'count' =\u003e 3);\n  \n  //$a1 is being called from above\n  $d3 = find ($a1, $f1);\n\n  print_r($d3);\n  \n  //out put\n  (\n    [0] =\u003e Array\n        (\n            [term_taxonomy_id] =\u003e 5\n            [term_id] =\u003e 5\n            [taxonomy] =\u003e tumblog\n            [description] =\u003e \n            [parent] =\u003e 0\n            [count] =\u003e 0\n        )\n\n    [1] =\u003e Array\n        (\n            [term_taxonomy_id] =\u003e 1\n            [term_id] =\u003e 1\n            [taxonomy] =\u003e category\n            [description] =\u003e \n            [parent] =\u003e 0\n            [count] =\u003e 2\n        )\n\n    [2] =\u003e Array\n        (\n            [term_taxonomy_id] =\u003e 3\n            [term_id] =\u003e 3\n            [taxonomy] =\u003e category\n            [description] =\u003e \n            [parent] =\u003e 0\n            [count] =\u003e 0\n        )\n\n    [3] =\u003e Array\n        (\n            [term_taxonomy_id] =\u003e 4\n            [term_id] =\u003e 4\n            [taxonomy] =\u003e category\n            [description] =\u003e \n            [parent] =\u003e 0\n            [count] =\u003e 2\n        )\n\n    [4] =\u003e Array\n        (\n            [term_taxonomy_id] =\u003e 2\n            [term_id] =\u003e 2\n            [taxonomy] =\u003e nav_menu\n            [description] =\u003e \n            [parent] =\u003e 0\n            [count] =\u003e 3\n        )\n\n  )\n\n  \n  \n  \u003c/pre\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewithmark%2Fphp-data-parsing-functions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodewithmark%2Fphp-data-parsing-functions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewithmark%2Fphp-data-parsing-functions/lists"}