echo数组单元的值不全
数组的为
Array( [title] => 初一上册数学测试题 [id] => 6 [subject] => 14 [parts] => [["单选","100",1]] [topic] => [["1","100"]] [json] => [["6","<p style='text-indent:28px;line-height:200%'><span style=';color:rgb(0,0,0);font-size:14px;font-family: [#39;'>小红做一道数学题“</span><span_style] => ';color:rgb(0,0,0);font-weight:bold;font-size:14px;font-family: [#39;'>两个多项式<span_style] => 'font-family:Times New Roman'>A</span><span style='font-family:宋体'>、</span><span style='font-family:Times New Roman'>B</span><span style='font-family:宋体'>,</span><span style='font-family:Times New Roman'>B</span><span style='font-family:宋体'>为</span></span><img src='http://www.exam.com/Public/Js/Home/ueditor/themes/default/images/spacer.gif' word_img='file:///C:\Users\hp\AppData\Local\Temp\ksohtml\wps_clip_image-14927.png' style="max-width:90%" style="max-width:90%" style="max-width:90%"/ alt="echo数组单元的值不全" ><span style=';color:rgb(0,0,0);font-weight:bold;font-size:14px;font-family: [#39;'>,试求<span_style] => 'font-family:Times New Roman'>A B</span><span style='font-family:宋体'>的值</span></span><span style=';color:rgb(0,0,0);font-size:14px;font-family: [#39;'>”。小红误将<span_style] => 'font-family:Times New Roman'>A B</span><span style='font-family:宋体'>看成</span><span style='font-family:Times New Roman'>A</span></span><span style=';color:rgb(0,0,0);font-size:14px;font-family: [#39;'>-</span><span_style] => ';color:rgb(0,0,0);font-size:14px;font-family: [#39;'>B<span_style] => 'font-family:宋体'>,结果答案(计算正确)为</span></span><img src='http://www.exam.com/Public/Js/Home/ueditor/themes/default/images/spacer.gif' word_img='file:///C:\Users\hp\AppData\Local\Temp\ksohtml\wps_clip_image-30836.png' style="max-width:90%" style="max-width:90%" style="max-width:90%"/ alt="echo数组单元的值不全" ><span style=';color:rgb(0,0,0);font-size:14px;font-family: [#39;'>.</span></p><p_style] => 'text-indent:21px;line-height:200%'><span style=';color:rgb(0,0,0);font-size:14px;font-family: [#39;'>(<span_style] => 'font-family:Times New Roman'>2</span><span style='font-family:宋体'>)求出当</span></span><span style=';color:rgb(0,0,0);font-style:italic;font-size:14px;font-family: [#39;'>x</span><span_style] => ';color:rgb(0,0,0);font-size:14px;font-family: [#39;'>] => 3<span style='font-family:宋体'>时</span><span style='font-family:Times New Roman'>A B</span><span style='font-family:宋体'>的值</span><span style='font-family:Times New Roman'>.</span></span></p><p><br/></p>",1,"100"]] [total] => 100)
我在打印其中的json键时,却没打印全,显示
[["6","<p style='text-indent:28px;line-height:200%'><span style=';color:rgb(0,0,0);font-size:14px;font-family:
这是为毛,命名数组里都有,可是打印单独的值却显示不全,哪位大大能够指点迷津,不甚感激!!!
回复讨论(解决方案)
可能是没有描述清楚
如上图,编辑器里面可以输入字符,我现在是在word文档里复制了一段整理好段落样式的文字,然后异步传到服务器上,json字符串里存储的小题的json信息,可是取json时却出现了问题,于是我在服务器上print_r($_POST),可以显示都传到服务器上了,但是却打印不全json字符串。
后来我又做了个测试,把粘贴过来的段落去掉了样式,这次可以显示全了,是不是字数超过了限制,也不对啊,post好像没有限制的,而且都已经传到服务器上了,为什么就是显示不全呢
请输出var_export($arr)结构;
已经找到问题所在了,我是通过ajax提交到服务器的,url形式为 'a='+a+'&b='+b,但是编辑器里里也有连接符&,因此便截断了,所以服务器上便借不全,后来js上加了encodeURIComponent,服务器接的时候用urldecode解码就ok了

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Alipay PHP...

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

Session hijacking can be achieved through the following steps: 1. Obtain the session ID, 2. Use the session ID, 3. Keep the session active. The methods to prevent session hijacking in PHP include: 1. Use the session_regenerate_id() function to regenerate the session ID, 2. Store session data through the database, 3. Ensure that all session data is transmitted through HTTPS.

The application of SOLID principle in PHP development includes: 1. Single responsibility principle (SRP): Each class is responsible for only one function. 2. Open and close principle (OCP): Changes are achieved through extension rather than modification. 3. Lisch's Substitution Principle (LSP): Subclasses can replace base classes without affecting program accuracy. 4. Interface isolation principle (ISP): Use fine-grained interfaces to avoid dependencies and unused methods. 5. Dependency inversion principle (DIP): High and low-level modules rely on abstraction and are implemented through dependency injection.

How to automatically set the permissions of unixsocket after the system restarts. Every time the system restarts, we need to execute the following command to modify the permissions of unixsocket: sudo...

How to debug CLI mode in PHPStorm? When developing with PHPStorm, sometimes we need to debug PHP in command line interface (CLI) mode...

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

Sending JSON data using PHP's cURL library In PHP development, it is often necessary to interact with external APIs. One of the common ways is to use cURL library to send POST�...
