Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Web Development
You last visited: Today at 19:34

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Json Decode

Discussion on Json Decode within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2015
Posts: 194
Received Thanks: 31
Json Decode

Hallo,

ich würde gerne stupide gesagt ein Example haben für folgendes:



Das soll also als Tabelle im PHP ausgegeben werden, das möchte ich in meinem Shop einbauen um eine IBAN Nummer aus Kontonummer und Banleitzahl zu generieren!

Als Ausgabe will ich dann dieses Beispiel haben :

Eingabe1 : Kontonummer
Eingabe2 ; Bankleitzahl

Ausgabe : Generierte Iban Nummer

Das ganze soll als Json funktionieren, aber ich findee nichts verständliches, da ich es als echo haben will und nicht mit printf und im Echo möchte ich die Daten definieren.

Beispiel :

PHP Code:
public function getBasicInfo($destination null)
{
    
$response = array(
        
'id' => $this->id,
        
'name' => $this->name,
        
'category' => ! empty($this->category_id) ? $this->category->name '',
        
'neighborhood' => ! empty($this->neighborhood) ? $this->neighborhood '',
        
'city' => (! empty($this->city) ? $this->city '') . (! empty($this->state_id) ? (! empty($this->city) ? ', ' '') . $this->state->abbreviation ''),
        
'dorms' => $this->dormitories_text,
        
'area' => $this->area,
        
'status' => ! empty($this->status_id) ? $this->status->name '',
        
'price' => $this->price 'R$ ' number_format($this->price2',''.') : '',
        
'installment' => $this->installment 'R$ ' number_format($this->installment2',''.') : '',
        
'image' => ! empty($this->card_image_id) && is_object($this->card_image) ? $this->card_image->getUrl() : '',
        
'logo' => ! empty($this->logo_image_id) && is_object($this->logo_image) ? $this->logo_image->getUrl() : '',
        
'permalink' => $this->getPermalink($destination),
        
'about' => ! empty($this->about) ? $this->get_html($this->about) : '',
        
'construction' => $this->getLatestConstructionStageProgress(),
    );
    return 
$response;

Sowas in der Art aber ich finde nichts anständiges.
SelecatTV is offline  
Old 08/03/2016, 09:59   #2
 
0xFADED's Avatar
 
elite*gold: 7
Join Date: Dec 2013
Posts: 446
Received Thanks: 187
Schau dir mal die PHP funktionen und an
0xFADED is offline  
Reply


Similar Threads Similar Threads
Steam Inventar / Json Decode / Tabelle
02/07/2015 - Web Development - 5 Replies
Hey, Ich hab ein kleines Problem und zwar möchte gern das Steam Inventar als Tabelle darstellen auf einer Website. Inventar lässt sich hier auslesen: http://steamcommunity.com/id/<SteamID 64>/inventory/json/753/6 Dies möchte mit Json decoden: $json_object = file_get_contents("http://steamcommunity.com/ profiles/<SteamID 64>/inventory/json/753/6"); $json_decoded = json_decode($json_object); Und dann in einer Tabelle darstellen, das obere müsste soweit geklappt haben aber beim Tabelle...
Json in PHP ansprechen
01/21/2015 - Web Development - 1 Replies
Hey, spiele grade mit der Riot Api von League of Legends etwas und habe hier folgenden Json: { "playerStatSummaries": Wie genau krieg ich den angesprochen? Wäre das folgende richtig? $variable Damit geht das nicht und ich weiß grade nicht, wie genau das angesprochen wird. Bei einfacheren Jsons kriege ich das hin, hier kommt ja aber diese Nummerierung mit dazu...
JSON parsen?
10/22/2014 - Web Development - 3 Replies
Hey, habe folgenden Code: { "data": , "paging": { "cursors": { "before": "QWFJdkdyeGN6OXRhekNXVWhEaGZwZGpGODM1NUhqaktw RkV1Rk5QclhfZ1BwM1V2c1l1dmFyaGx0U3o1OXlCelBkcmhtOW t1cTJDa1dtb25HWmtHSmd6c2ZxWjlvcjh4TGFRLU1qbVpVa0cz QkE=", "after": "QWFMVDVVRnBlX0VGbE9EZzdNWlA1OXZMLTlVelRET3VF UWRWcDNGbFV6WEd3VXFneTlhMkw3c2R0b2VxY01xTE5fYmhvNW 00enFZWUxKbGlQVk81QVVsX0xCYkFIcWRyeGluSW1GdWVQbmRX WkE=" } }
JSON Rezeptdatenbank!
06/21/2012 - Web Development - 4 Replies
Hey, Ich muss fürs Studium eine "virtuelle" Küche via Canvas etc. erstellen. Die Rezepte würde ich gerne mit Json machen. Hat jmd. evtl eine art Grundgerüst für mich? Z.b. erst Rezeptname dann kommen die Zutaten (Reihenfolge beachten) Gruß
JQuery -JSON
11/28/2011 - General Coding - 0 Replies
Hey, mein Freund hat ein Problem und ich wollte mal wissen, ob ihr da helfen könnt? Die Fragestellung ist sehr kurz und ich persönlich kann damit nichts anfangen , aber hier die Frage: Wie krieg ich beim Fullcalendar in JQuery nen Datensatz per JSON rein?



All times are GMT +2. The time now is 19:34.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.