{"id":910,"date":"2022-08-30T15:09:13","date_gmt":"2022-08-30T15:09:13","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/09\/undefined-variable-error-in-view-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:09:13","modified_gmt":"2022-08-30T15:09:13","slug":"undefined-variable-error-in-view-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/undefined-variable-error-in-view-collection-of-common-programming-errors\/","title":{"rendered":"Undefined Variable error in View-Collection of common programming errors"},"content":{"rendered":"<p>My controller is in this question: how to add pagination to this<\/p>\n<p>But now, i&#8217;m getting undefined variable in my view, View has an input<\/p>\n<pre><code>\n<\/code><\/pre>\n<p>which i receive it in controller as,<\/p>\n<pre><code>$query = $this-&gt;input-&gt;get('query'); \n<\/code><\/pre>\n<p>Now, i am trying to pass the same query string back into my view inside the link of pagination.<\/p>\n<p id=\"rop\"><small>Originally posted 2013-11-09 22:57:17. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>My controller is in this question: how to add pagination to this But now, i&#8217;m getting undefined variable in my view, View has an input which i receive it in controller as, $query = $this-&gt;input-&gt;get(&#8216;query&#8217;); Now, i am trying to pass the same query string back into my view inside the link of pagination. Originally [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-910","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/910","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=910"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/910\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=910"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=910"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=910"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}